美文网首页
Cause by:All WebView methods mus

Cause by:All WebView methods mus

作者: Dirtykk | 来源:发表于2019-08-07 11:10 被阅读0次

        项目中使用webview与js进行交互的过程中,重新调用loadurl出现了运行时错误,Cause by:All WebView methods must be called on the same thread ,在js调用后的Java回调线程并不是主线程。导致了程序出现崩溃或提示”程序无法运行“,解决此类异常,将webview操作放在主线程中即可。

    代码示例

    相关文章

      网友评论

          本文标题:Cause by:All WebView methods mus

          本文链接:https://www.haomeiwen.com/subject/eozndctx.html