Androidjava.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread '
一万年来谁著史,三千里外欲封侯。这篇文章主要讲述Androidjava.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread '相关的知识,希望能为你提供帮助。
一、问题
java调用JS事件出现
java.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread ‘JavaBridge‘. All WebView methods must be called on the same thread. (Expected Looper Looper (main, tid 1) {3474c308} called on Looper (JavaBridge, tid 514) {2886ca4f}, FYI main Looper is Looper (main, tid 1) {3474c308})
二、解决方案
https://stackoverflow.com/questions/22607657/webview-methods-on-same-thread-error
http://blog.csdn.net/violetjack0808/article/details/52936157
public Handler handler = new Handler();
handler.post(new Runnable() {
public void run() {
//JS调用
【Androidjava.lang.RuntimeException: java.lang.Throwable: A WebView method was called on thread '】}});
推荐阅读
- @RequestMapping与@ModelAttribute 套路
- Android实现多语言so easy
- AndroidActivity生命周期研究
- MyApp
- 浅析$watch ,$apply 和 $digest (Angular篇)
- 我的Android手册
- 安卓初次完美调试,并成功编程!
- Android系统启动流程解析init进程启动过程
- Android中实现OkHttp上传文件到服务器并带进度