1

我正在将一个cordova iOS应用程序转换为android版本。我使用cordova bin/create创建一个新的cordova android项目,然后将ios项目的www目录中的文件放入android项目中。我可以编译它成功了。但是当我在 AVD 中测试它时,我得到了以下异常:

06-27 08:26:44.512: D/DroidGap(815): onMessage(onPageStarted,file:///android_asset/www/index.html)
06-27 08:26:45.073: W/dalvikvm(815): JNI WARNING: JNI method called with exception pending
06-27 08:26:45.083: W/dalvikvm(815):              in Landroid/webkit/JWebCoreJavaBridge;.nativeServiceFuncPtrQueue:()V (FindClass)
06-27 08:26:45.083: W/dalvikvm(815): Pending exception is:
06-27 08:26:45.083: I/dalvikvm(815): java.lang.NullPointerException:
06-27 08:26:45.083: I/dalvikvm(815):    at android.content.res.AssetManager.openAsset(Native Method)
06-27 08:26:45.083: I/dalvikvm(815):    at android.content.res.AssetManager.open(AssetManager.java:315)
06-27 08:26:45.083: I/dalvikvm(815):    at android.webkit.BrowserFrame.inputStreamForAndroidResource(BrowserFrame.java:765)
06-27 08:26:45.083: I/dalvikvm(815):    at android.webkit.BrowserFrame.shouldInterceptRequest(BrowserFrame.java:852)
06-27 08:26:45.083: I/dalvikvm(815):    at android.webkit.JWebCoreJavaBridge.nativeServiceFuncPtrQueue(Native Method)
06-27 08:26:45.083: I/dalvikvm(815):    at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:113)
06-27 08:26:45.083: I/dalvikvm(815):    at android.os.Handler.dispatchMessage(Handler.java:99)
06-27 08:26:45.093: I/dalvikvm(815):    at android.os.Looper.loop(Looper.java:137)
06-27 08:26:45.093: I/dalvikvm(815):    at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:812)
06-27 08:26:45.093: I/dalvikvm(815):    at java.lang.Thread.run(Thread.java:856)
06-27 08:26:45.093: I/dalvikvm(815): "WebViewCoreThread" prio=5 tid=11 NATIVE
06-27 08:26:45.093: I/dalvikvm(815):   | group="main" sCount=0 dsCount=0 obj=0x40cd81b0 self=0x2a1804d8
06-27 08:26:45.093: I/dalvikvm(815):   | sysTid=829 nice=0 sched=0/0 cgrp=apps handle=706257264
06-27 08:26:45.103: I/dalvikvm(815):   | state=R schedstat=( 863831102 1599283145 193 ) utm=65 stm=21 core=0
06-27 08:26:45.134: I/dalvikvm(815):   #00  pc 000012a0  /system/lib/libcorkscrew.so (unwind_backtrace_thread+27)
06-27 08:26:45.134: I/dalvikvm(815):   #01  pc 0005faa8  /system/lib/libdvm.so (dvmDumpNativeStack(DebugOutputTarget const*, int)+35)
06-27 08:26:45.143: I/dalvikvm(815):   #02  pc 00053914  /system/lib/libdvm.so (dvmDumpThreadEx(DebugOutputTarget const*, Thread*, bool)+303)
06-27 08:26:45.143: I/dalvikvm(815):   #03  pc 000539ae  /system/lib/libdvm.so (dvmDumpThread(Thread*, bool)+25)
06-27 08:26:45.143: I/dalvikvm(815):   #04  pc 00038aba  /system/lib/libdvm.so
06-27 08:26:45.143: I/dalvikvm(815):   #05  pc 000417a0  /system/lib/libdvm.so
06-27 08:26:45.143: I/dalvikvm(815):   #06  pc 00381ea0  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #07  pc 0023ad2e  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #08  pc 00234e64  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #09  pc 00233822  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #10  pc 0023386a  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #11  pc 00233896  /system/lib/libwebcore.so
06-27 08:26:45.143: I/dalvikvm(815):   #12  pc 00232af4  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #13  pc 00181646  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #14  pc 0017fdec  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #15  pc 00142986  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #16  pc 00141e40  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #17  pc 0014205e  /system/lib/libwebcore.so
06-27 08:26:45.153: I/dalvikvm(815):   #18  pc 00136ba2  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #19  pc 00135a98  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #20  pc 0013332e  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #21  pc 001329a4  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #22  pc 00135814  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #23  pc 001360ce  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #24  pc 00136548  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #25  pc 0013ecd6  /system/lib/libwebcore.so
06-27 08:26:45.163: I/dalvikvm(815):   #26  pc 0011ec3c  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   #27  pc 002ed62a  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   #28  pc 002e2c8e  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   #29  pc 003b9272  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   #30  pc 003b976e  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   #31  pc 003218b4  /system/lib/libwebcore.so
06-27 08:26:45.173: I/dalvikvm(815):   at android.webkit.JWebCoreJavaBridge.nativeServiceFuncPtrQueue(Native Method)
06-27 08:26:45.173: I/dalvikvm(815):   at android.webkit.JWebCoreJavaBridge.handleMessage(JWebCoreJavaBridge.java:113)
06-27 08:26:45.173: I/dalvikvm(815):   at android.os.Handler.dispatchMessage(Handler.java:99)
06-27 08:26:45.173: I/dalvikvm(815):   at android.os.Looper.loop(Looper.java:137)
06-27 08:26:45.173: I/dalvikvm(815):   at android.webkit.WebViewCore$WebCoreThread.run(WebViewCore.java:812)
06-27 08:26:45.173: I/dalvikvm(815):   at java.lang.Thread.run(Thread.java:856)
06-27 08:26:45.183: E/dalvikvm(815): VM aborting
06-27 08:26:45.183: A/libc(815): Fatal signal 11 (SIGSEGV) at 0xdeadd00d (code=1), thread 829 (WebViewCoreThre)

我正在使用android sdk 4.3版。我尝试更改sdk版本和avd版本,对它没有影响。有人可以帮助我吗?

4

0 回答 0