科尔多瓦web视图超时错误 [英] Cordova webview TIMEOUT ERROR

查看:142
本文介绍了科尔多瓦web视图超时错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经尝试使用下面的code:

I've tried to use the following code:

cordovaWebView = (CordovaWebView) findViewById(R.id.cordovaWebView);
cordovaWebView.loadUrl("file:///android_asset/www/index.html");

和我得到的JavaScript注入这样的各种URL:

And I get various URLs injecting javascript like this:

cordovaWebView.loadUrl("javascript:CreateFormPlugin.showPage('1')");

但有时我得到这个问题:

But sometimes I get this issue:

12-12 11:56:32.561: E/dalvikvm(27065): JNI ERROR (app bug): attempt to use stale local reference 0x1
12-12 11:56:32.561: E/dalvikvm(27065): VM aborting
12-12 11:56:32.561: A/libc(27065): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1)
12-12 11:56:41.951: E/CordovaWebView(27065): CordovaWebView: TIMEOUT ERROR!

如何解决这个问题的任何想法? :)

Any idea on how to solve this problem? :)

谢谢!

推荐答案

好吧,我这样做的:在网页视图设定 loadURLTImeOutValue

Ok I did it this way: set loadURLTImeOutValue on webview

即。加入intent.putExtra(loadUrlTimeoutValue,60000);以每次调用扩展CordovaInterface活动。

i.e. adding intent.putExtra("loadUrlTimeoutValue", 60000); to every call to the activity that extends CordovaInterface.

这篇关于科尔多瓦web视图超时错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆