FJEagle
FJEagle
  • 发布:2018-12-05 17:37
  • 更新:2018-12-24 19:47
  • 阅读:1665

5+SDK集成新建项目OK,但已有项目集成报错

分类:5+ SDK

集成参考的文档是:http://ask.dcloud.net.cn/article/80,Android平台以WebView方式集成HTML5+SDK方法 。实现代码,基本上就是从SDK中的HBuilder-integerate-AS项目中迁移过来SDK_WebView类。

android 5+SDK集成,新建项目集成测试OK,但已有项目集成时报错。直接原因是:SDK.createWebview()出错。

以下是相关的日志,请问有什么解决建议或者有什么方法可以进一步调试吗?

12-05 14:39:40.326 24834-24834/com.testabc.desktop.fusexxxxx E/DCloud_LOG: channel:com.testabc.desktop.fusexxxxx;ver:1.9.9.52372;ssdk:false;max:3;trim:0;dg:false  
12-05 14:39:40.439 24834-24834/com.testabc.desktop.fusexxxxx W/System.err: java.lang.ClassNotFoundException: com.testabc.desktop.fusexxxxx.R$styleable  
        at java.lang.Class.classForName(Native Method)  
        at java.lang.Class.forName(Class.java:453)  
        at java.lang.Class.forName(Class.java:378)  
        at io.dcloud.PdrR.getIntArray(PdrR.java:58)  
        at io.dcloud.PdrR.<clinit>(PdrR.java:151)  
        at io.dcloud.common.b.b.k.<init>(SwipeBackLayout.java:134)  
        at io.dcloud.common.b.b.c$b.<init>(DHAppRootView.java:1396)  
        at io.dcloud.common.b.b.c.<init>(DHAppRootView.java:106)  
        at io.dcloud.common.b.b.l.a(WindowMgr.java:178)  
12-05 14:39:40.440 24834-24834/com.testabc.desktop.fusexxxxx W/System.err:     at io.dcloud.common.b.b.l.processEvent(WindowMgr.java:309)  
        at io.dcloud.common.b.a.dispatchEvent(Core.java:551)  
        at io.dcloud.common.a.a.processEvent(AppMgr.java:198)  
        at io.dcloud.common.a.d.a(WebApp.java:2620)  
        at io.dcloud.common.a.a.processEvent(AppMgr.java:257)  
        at io.dcloud.common.b.a.dispatchEvent(Core.java:539)  
        at io.dcloud.feature.internal.sdk.SDK.obatinFirstPage(SDK.java:239)  
        at io.dcloud.feature.internal.sdk.SDK.createWebview(SDK.java:221)  
        at io.dcloud.feature.internal.sdk.SDK.createWebview(SDK.java:163)  
        at com.allwinner.digitalphotoframe.showallapp.dcloud.h5plus.WebviewModeListener.onCoreInitEnd(SDK_WebView.java:148)  
        at io.dcloud.common.b.a.a(Core.java:159)  
        at io.dcloud.common.b.b.a(PandoraEntryProxy.java:52)  
        at io.dcloud.EntryProxy.onCreate(EntryProxy.java:96)  
        at com.allwinner.digitalphotoframe.showallapp.dcloud.h5plus.SDK_WebView.onCreate(SDK_WebView.java:47)  
        at android.app.Activity.performCreate(Activity.java:7372)  
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)  
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)  
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)  
        at android.app.ActivityThread.-wrap12(Unknown Source:0)  
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)  
        at android.os.Handler.dispatchMessage(Handler.java:108)  
        at android.os.Looper.loop(Looper.java:166)  
        at android.app.ActivityThread.main(ActivityThread.java:7425)  
        at java.lang.reflect.Method.invoke(Native Method)  
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)  
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)  
12-05 14:39:40.441 24834-24834/com.testabc.desktop.fusexxxxx W/System.err: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.testabc.desktop.fusexxxxx.R$styleable" on path: DexPathList[[zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/base.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_dependencies_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_0_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_1_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_2_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_3_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_4_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_5_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_6_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_7_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_8_apk.apk", zip file "/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_9_apk.apk"],nativeLibraryDirectories=[/data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/lib/arm, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/base.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_dependencies_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_0_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_1_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_2_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_3_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_4_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_5_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_6_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_7_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_8_apk.apk!/lib/armeabi-v7a, /data/app/com.testabc.desktop.fusexxxxx-kPqlru65JCKslQVB9SFIQw==/split_lib_slice_9_apk.apk!/lib/armeabi-v7a, /system/lib, /vendor/lib, /product/lib]]  
        at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:93)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:379)  
        at java.lang.ClassLoader.loadClass(ClassLoader.java:312)  
        ... 35 more  
12-05 14:39:40.443 24834-24834/com.testabc.desktop.fusexxxxx W/ResourceType: No package identifier when getting value for resource number 0x00000000  
12-05 14:39:40.443 24834-24834/com.testabc.desktop.fusexxxxx W/System.err: java.lang.NullPointerException: Attempt to invoke interface method 'io.dcloud.common.DHInterface.IWebview io.dcloud.common.DHInterface.IFrameView.obtainWebView()' on a null object reference  
        at io.dcloud.feature.internal.sdk.SDK.obatinFirstPage(SDK.java:239)  
        at io.dcloud.feature.internal.sdk.SDK.createWebview(SDK.java:221)  
        at io.dcloud.feature.internal.sdk.SDK.createWebview(SDK.java:163)  
        at com.allwinner.digitalphotoframe.showallapp.dcloud.h5plus.WebviewModeListener.onCoreInitEnd(SDK_WebView.java:148)  
        at io.dcloud.common.b.a.a(Core.java:159)  
        at io.dcloud.common.b.b.a(PandoraEntryProxy.java:52)  
        at io.dcloud.EntryProxy.onCreate(EntryProxy.java:96)  
        at com.allwinner.digitalphotoframe.showallapp.dcloud.h5plus.SDK_WebView.onCreate(SDK_WebView.java:47)  
        at android.app.Activity.performCreate(Activity.java:7372)  
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1218)  
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3147)  
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3302)  
        at android.app.ActivityThread.-wrap12(Unknown Source:0)  
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1891)  
        at android.os.Handler.dispatchMessage(Handler.java:108)  
        at android.os.Looper.loop(Looper.java:166)  
        at android.app.ActivityThread.main(ActivityThread.java:7425)  
        at java.lang.reflect.Method.invoke(Native Method)  
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)  
12-05 14:39:40.444 24834-24834/com.testabc.desktop.fusexxxxx W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)  
12-05 14:39:40.507 24834-24834/com.testabc.desktop.fusexxxxx E/AndroidRuntime: FATAL EXCEPTION: main  
    Process: com.testabc.desktop.fusexxxxx, PID: 24834  
    java.lang.NullPointerException: Attempt to invoke interface method 'void io.dcloud.common.DHInterface.IWebview.onRootViewGlobalLayout(android.view.View)' on a null object reference  
        at com.allwinner.digitalphotoframe.showallapp.dcloud.h5plus.WebviewModeListener$1.onGlobalLayout(SDK_WebView.java:134)  
        at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:945)  
        at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2417)  
        at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:1515)  
        at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:7266)  
        at android.view.Choreographer$CallbackRecord.run(Choreographer.java:981)  
        at android.view.Choreographer.doCallbacks(Choreographer.java:790)  
        at android.view.Choreographer.doFrame(Choreographer.java:721)  
        at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:967)  
        at android.os.Handler.handleCallback(Handler.java:808)  
        at android.os.Handler.dispatchMessage(Handler.java:101)  
        at android.os.Looper.loop(Looper.java:166)  
        at android.app.ActivityThread.main(ActivityThread.java:7425)  
        at java.lang.reflect.Method.invoke(Native Method)  
        at com.android.internal.os.Zygote$MethodAndArgsCaller.run(Zygote.java:245)  
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:921)
2018-12-05 17:37 负责人:无 分享
已邀请:
泉水指挥官

泉水指挥官

同样的问题,请问你有解决掉吗??

泉水指挥官

泉水指挥官

这个是因为 package 和applicationId 不一样导致的,

  • 易213

    是的,感觉这个文档有点坑。

    2019-01-23 16:06

该问题目前已经被锁定, 无法添加新回复