使用WebView的JavaScriptInterface调用startActive(),报错Uncaught Error: Error calling method on NPObject.
解决办法是:
使用
Handler mHandler = new Handler();
mHandler.post(new Runnale(){
public void run(){
// Code in here
}
});
这样子就不报错了。
原因可能是线程安全。只找到一个帖子解决办法。