在Android 2.2设备上异常构建cordova JS全局变量



最近我升级了我的应用程序,使用Cordova-2.2.0。在Android设备2.3上完美运行。以后。但是当我在Android 2.2上运行应用程序时,它在启动

时抛出一个警报。

" cordova JS globals: RangeError:键"connection"超过最大调用堆栈大小。

不知道这里发生了什么。有线索吗?

日志:

01-16 14:09:30.389: I/MAIN(981): MyActivity::onCreate
01-16 14:09:30.389: D/DroidGap(981): DroidGap.onCreate()
01-16 14:09:30.419: D/CordovaWebView(981): Origin to allow: http://127.0.0.1*
01-16 14:09:30.419: D/CordovaWebView(981): Origin to allow: .*
01-16 14:09:30.419: I/CordovaLog(981): Found log level DEBUG
01-16 14:09:30.419: I/CordovaLog(981): Changing log level to DEBUG(3)
01-16 14:09:30.419: I/CordovaLog(981): Found preference for useBrowserHistory=true
01-16 14:09:30.419: D/CordovaLog(981): Found preference for useBrowserHistory=true
01-16 14:09:30.429: I/CordovaLog(981): Found preference for exit-on-suspend=false
01-16 14:09:30.429: D/CordovaLog(981): Found preference for exit-on-suspend=false
01-16 14:09:30.439: D/JsMessageQueue(981): Set native->JS mode to 2
01-16 14:09:30.439: I/CordovaWebView(981): Disabled addJavascriptInterface() bridge since Android version is old.
01-16 14:09:30.439: D/DroidGap(981): DroidGap.init()
01-16 14:09:30.449: D/CordovaWebView(981): DroidGap.loadUrl(file:///android_asset/www/common/index.html, 10000)
01-16 14:09:30.449: D/DroidGap(981): onMessage(splashscreen,show)
01-16 14:09:30.449: D/CordovaWebView(981): >>> loadUrl(file:///android_asset/www/common/index.html)
01-16 14:09:30.449: D/PluginManager(981): init()
01-16 14:09:30.449: D/CordovaWebView(981): >>> loadUrlNow()
01-16 14:09:30.449: D/DroidGap(981): Resuming the App
01-16 14:09:30.499: D/SoftKeyboardDetect(981): Ignore this event
01-16 14:09:30.569: D/SoftKeyboardDetect(981): Ignore this event
01-16 14:09:30.579: D/DroidGap(981): onMessage(onPageStarted,file:///android_asset/www/common/index.html)
01-16 14:09:30.889: D/Cordova(981): onPageFinished(file:///android_asset/www/common/index.html#welcome)
01-16 14:09:30.889: D/DroidGap(981): onMessage(onNativeReady,null)
01-16 14:09:30.889: D/DroidGap(981): onMessage(onPageFinished,file:///android_asset/www/common/index.html#welcome)
01-16 14:09:30.899: D/Cordova(981): onPageFinished(file:///android_asset/www/common/index.html#welcome)
01-16 14:09:30.899: D/DroidGap(981): onMessage(onNativeReady,null)
01-16 14:09:30.899: D/DroidGap(981): onMessage(onPageFinished,file:///android_asset/www/common/index.html#welcome)
01-16 14:09:32.900: D/DroidGap(981): onMessage(spinner,stop)
01-16 14:09:32.959: D/DroidGap(981): onMessage(spinner,stop)
01-16 14:10:30.209: D/DroidGap(981): Paused the application!
01-16 14:10:30.209: D/CordovaWebView(981): Handle the pause
01-16 14:12:41.879: I/MAIN(981): Ac2Activity::onResume
01-16 14:12:41.879: D/DroidGap(981): Resuming the App
01-16 14:13:42.099: D/DroidGap(981): Paused the application!
01-16 14:13:42.099: D/CordovaWebView(981): Handle the pause

尝试在Html页面的Head部分添加cordova脚本。

实际上对我来说这个解决方案也是可行的。

最新更新