WebView éé¢å¿
é¡»æ¾å¨UI线ç¨éé¢å±ç¤ºã
private static void checkThread() {
if (Looper.myLooper() != Looper.getMainLooper()) {
Throwable throwable = new Throwable(
"Warning: A WebView method was called on thread '" +
Thread.currentThread().getName() + "'. " +
"All WebView methods must be called on the UI thread. " +
"Future versions of WebView may not support use on other threads.");
Log.w(LOGTAG, Log.getStackTraceString(throwable));
StrictMode.onWebViewMethodCalledOnWrongThread(throwable);
}
}
å è½½URLæ¯ç¨çåºå±åè°æ¹æ³ï¼åºè¯¥ç¨çæ¯Webkitå
æ ¸ã
æ¯ä¸ªWebViewå®ä¾å
³èä¸ä¸ª WebViewProvider æ¥å¤çæ°æ®å è½½ï¼è¿ä¸ªå è½½æ¯å¼æ¥çï¼ç»å¸¸åç°WebViewæ¾ç¤ºäºï¼åç°å
容è¿æªæ¾ç¤ºã
温馨提示:答案为网友推荐,仅供参考