问题
I am making an app in Sencha-touch and phonegap and need your help. I have succesfully ran my app on an emulator (android 2.1, 4.1), using eclipse. I ran my app successfully on a samsung phone(android 2.3.3), but when I run it on samsung galaxy tab 10.1(which is android- 4.1.4), it just shows a white screen.
Moreover on an android emulator 4.0.3, I get a white screen with following logcat file:
09-15 00:10:24.031: I/dalvikvm(635): threadid=3: reacting to signal 3
09-15 00:10:24.101: I/dalvikvm(635): Wrote stack traces to '/data/anr/traces.txt'
09-15 00:10:24.181: D/SoftKeyboardDetect(635): Ignore this event
09-15 00:10:24.271: W/webcore(635): java.lang.Throwable: EventHub.removeMessages(int what = 107) is not supported before the WebViewCore is set up.
09-15 00:10:24.271: W/webcore(635): at android.webkit.WebViewCore$EventHub.removeMessages(WebViewCore.java:1683)
09-15 00:10:24.271: W/webcore(635): at android.webkit.WebViewCore$EventHub.access$7900(WebViewCore.java:926)
09-15 00:10:24.271: W/webcore(635): at android.webkit.WebViewCore.removeMessages(WebViewCore.java:1795)
09-15 00:10:24.271: W/webcore(635): at android.webkit.WebView.sendOurVisibleRect(WebView.java:2917)
09-15 00:10:24.271: W/webcore(635): at android.webkit.ZoomManager.setZoomScale(ZoomManager.java:593)
09-15 00:10:24.271: W/webcore(635): at android.webkit.ZoomManager.access$1700(ZoomManager.java:49)
09-15 00:10:24.271: W/webcore(635): at android.webkit.ZoomManager$PostScale.run(ZoomManager.java:984)
09-15 00:10:24.271: W/webcore(635): at android.os.Handler.handleCallback(Handler.java:605)
09-15 00:10:24.271: W/webcore(635): at android.os.Handler.dispatchMessage(Handler.java:92)
09-15 00:10:24.271: W/webcore(635): at android.os.Looper.loop(Looper.java:137)
09-15 00:10:24.271: W/webcore(635): at android.app.ActivityThread.main(ActivityThread.java:4424)
09-15 00:10:24.271: W/webcore(635): at java.lang.reflect.Method.invokeNative(Native Method)
09-15 00:10:24.271: W/webcore(635): at java.lang.reflect.Method.invoke(Method.java:511)
09-15 00:10:24.271: W/webcore(635): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
09-15 00:10:24.271: W/webcore(635): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
09-15 00:10:24.271: W/webcore(635): at dalvik.system.NativeStart.main(Native Method)
09-15 00:10:24.311: D/SoftKeyboardDetect(635): Ignore this event
09-15 00:10:24.351: D/gralloc_goldfish(635): Emulator without GPU emulation detected.
09-15 00:10:33.461: I/SqliteDatabaseCpp(635): sqlite returned: error code = 14, msg = cannot open file at line 27701 of [8609a15dfa], db=/data/data/com.napp.www/databases/webview.db
09-15 00:10:33.461: I/SqliteDatabaseCpp(635): sqlite returned: error code = 14, msg = os_unix.c: open() at line 27701 - "" errno=2 path=/CachedGeoposition.db, db=/data/data/com.napp.www/databases/webview.db
09-15 00:10:33.551: D/dalvikvm(635): GC_CONCURRENT freed 127K, 3% free 9362K/9607K, paused 5ms+4ms
09-15 00:10:34.931: D/chromium(635): Unknown chromium error: -6
09-15 00:10:34.931: D/chromium(635): Unknown chromium error: -6
09-15 00:10:34.931: D/chromium(635): Unknown chromium error: -6
09-15 00:17:20.591: D/dalvikvm(635): GC_CONCURRENT freed 422K, 6% free 9382K/9927K, paused 5ms+9ms
09-15 00:24:16.031: D/dalvikvm(635): GC_CONCURRENT freed 423K, 6% free 9372K/9927K, paused 4ms+4ms
Can u help me on what's the problem. Thanks in advance.
回答1:
use this before any javascript code :
Ext.Loader.setConfig({ disableCaching: false });
Ext.Ajax.setDisableCaching(false);
回答2:
The above answer works, but if you're using Ext.Ajax you also need to add a couple parms to the config to get those files to be found.
noCache: false,
enablePagingParams: false,
Great post on the Sencha forum describing this problem and the work-around.
回答3:
To make it work in different versions of android add the code in header of your HTML file before any other javascript.
<script>
Ext.Loader.setConfig({
enabled: true,
disableCaching: false
});
Ext.Ajax.setDisableCaching(false);
</Script>
来源:https://stackoverflow.com/questions/12436627/unknown-chromium-error-6-sencha-and-phonegap