WebView methods on same thread error

后端 未结 4 1268
南方客
南方客 2020-12-02 11:44

I have a android program (Java + html in a webview). I can call from the javascript to the Java code. But the other way around stopped working (after updating in eclipse).

4条回答
  •  有刺的猬
    2020-12-02 12:27

    In my case nothing was shown in a WebView, so I prefer another way:

    runOnUiThread(new Runnable() {
        @Override
        public void run() {
            final WebView webView = (WebView) findViewById(R.id.map);
            webView.loadDataWithBaseURL(...);
        }
    });
    

提交回复
热议问题