日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Android >内容正文

Android

java 动态代理 阿bin_Android WebView 的方法只能在 UI 线程中运行

發布時間:2023/12/15 Android 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 java 动态代理 阿bin_Android WebView 的方法只能在 UI 线程中运行 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

Android WebView 的方法只能在 UI 線程中運行

Android,WebView,線程

2018.04.25

根據報錯信息,Android 的 WebView 所有的方法都只能在 UI 線程中調用,在非 UI 線程調用都會產生一些意外的崩潰。

今天分析收集到的崩潰日志,看到一下的一些日志信息。發生的機型主要集中在 4.3 的機型中。很奇怪在更高的版本中,并沒有發現這樣的問題。記錄一下,以備后續觀察。

通過日志可以看出,所有的 WebView 方法都只能在 UI 線程中被調用。

java.lang.RuntimeException: java.lang.Throwable: Warning: A WebView method was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.

at android.webkit.WebView.checkThread(WebView.java:2093)

at android.webkit.WebView.loadUrl(WebView.java:836)

at com.binkery.android.utils.webviewbridge.Bridge.executeJavascript(Bridge.java:260)

at com.binkery.android.utils.webviewbridge.Bridge.executeJavascript(Bridge.java:229)

at com.binkery.android.utils.webviewbridge.Bridge.dispatchMessage(Bridge.java:113)

at com.binkery.android.utils.webviewbridge.Bridge.queueMessage(Bridge.java:100)

at com.binkery.android.utils.webviewbridge.Bridge.access$300(Bridge.java:25)

at com.binkery.android.utils.webviewbridge.Bridge$2.callback(Bridge.java:202)

at com.binkery.android.webview.AbsMethod.doResponse(AbsMethod.java:48)

at com.binkery.android.webview.methods.MethodVolunteer.downResponse(MethodVolunteer.java:43)

at com.binkery.my.volunteer.DownQRSaveUtil$1.handleMessage(DownQRSaveUtil.java:35)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:1092)

at java.lang.Thread.run(Thread.java:841)

Caused by: java.lang.Throwable: Warning: A WebView method was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.

at android.webkit.WebView.checkThread(WebView.java:2084)

... 14 more

java.lang.Throwable: Warning: A WebView method was called on thread 'WebViewCoreThread'. All WebView methods must be called on the UI thread. Future versions of WebView may not support use on other threads.

at android.webkit.WebView.checkThread(WebView.java:2084)

at android.webkit.WebView.loadUrl(WebView.java:836)

at com.binkery.android.utils.webviewbridge.Bridge.executeJavascript(Bridge.java:260)

at com.binkery.android.utils.webviewbridge.Bridge.executeJavascript(Bridge.java:229)

at com.binkery.android.utils.webviewbridge.Bridge.dispatchMessage(Bridge.java:113)

at com.binkery.android.utils.webviewbridge.Bridge.queueMessage(Bridge.java:100)

at com.binkery.android.utils.webviewbridge.Bridge.access$300(Bridge.java:25)

at com.binkery.android.utils.webviewbridge.Bridge$2.callback(Bridge.java:202)

at com.binkery.android.webview.AbsMethod.doResponse(AbsMethod.java:48)

at com.binkery.android.webview.methods.MethodVolunteer.downResponse(MethodVolunteer.java:43)

at com.binkery..DownQRSaveUtil$1.handleMessage(DownQRSaveUtil.java:35)

at android.os.Handler.dispatchMessage(Handler.java:99)

at android.os.Looper.loop(Looper.java:137)

at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:1092)

at java.lang.Thread.run(Thread.java:841)

相關文章

- EOF -

本站文章除注明轉載外,均為本站原創或編譯。歡迎任何形式的轉載,但請務必注明出處,尊重他人勞動。

轉載請注明:文章轉載自 Binkery 技術博客 [https://binkery.com]

本文標題: Android WebView 的方法只能在 UI 線程中運行

本文地址:https://binkery.com/archives/112002.html

總結

以上是生活随笔為你收集整理的java 动态代理 阿bin_Android WebView 的方法只能在 UI 线程中运行的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。