Open interfans opened 7 years ago
在宿主的的manifest中注册了service,这个service是在app.main中写的,并在其中的主activity中启动,
正常启动app,该service能正常启动并执行相关业务逻辑,但是bugly中会统计到这个bug,
@galenlin 请问有什么好的解决方法吗?
不要在出现这个崩溃了。
java.lang.RuntimeException:Unable to instantiate service com.appshare.android.app.main.services.GetMessageService: java.lang.ClassNotFoundException: Didn't find class "com.appshare.android.app.main.services.GetMessageService" on path: DexPathList[[zip file "/mnt/asec/com.appshare.android.ilisten-1/pkg.apk", zip file "/data/data/com.appshare.android.ilisten/code_cache/secondary-dexes/pkg.apk.classes2.zip"],nativeLibraryDirectories=[/mnt/asec/com.appshare.android.ilisten-/lib, /vendor/lib, /system/lib]] android.app.ActivityThread.handleCreateService(ActivityThread.java:2721) ...... Caused by: java.lang.ClassNotFoundException:Didn't find class "com.appshare.android.app.main.services.GetMessageService" on path: DexPathList[[zip file "/mnt/asec/com.appshare.android.ilisten-1/pkg.apk", zip file "/data/data/com.appshare.android.ilisten/code_cache/secondary-dexes/pkg.apk.classes2.zip"],nativeLibraryDirectories=[/mnt/asec/com.appshare.android.ilisten-1/lib, /vendor/lib, /system/lib]] dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) java.lang.ClassLoader.loadClass(ClassLoader.java:501) java.lang.ClassLoader.loadClass(ClassLoader.java:461) android.app.ActivityThread.handleCreateService(ActivityThread.java:2718) android.app.ActivityThread.access$1600(ActivityThread.java:171) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) android.os.Handler.dispatchMessage(Handler.java:107) android.os.Looper.loop(Looper.java:194) android.app.ActivityThread.main(ActivityThread.java:5468) java.lang.reflect.Method.invokeNative(Native Method) java.lang.reflect.Method.invoke(Method.java:525) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:936) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) dalvik.system.NativeStart.main(Native Method)
gradle-small plugin : 1.2.0-alpha6 (maven) small aar : 1.2.0-alpha6 (maven) gradle core : 3.3 android plugin : 2.3.0 OS : Mac OS X 10.12.5 (x86_64)
Device : VIVO XPLAY6 SDK : Android 6.0.1 ABI : arm64-v8a
能否尝试在 Sample 中复现本问题
这个不好复现,但是我发现在宿主中写的service,同时在宿主的manifest中注册是没有出现这个问题,同时又出现了插件中的一个Activity出现了这种问题,这个activity是我们的广告欢迎页面,是LaunchActivity后的第二个启动页面,是否跟我们的dex分包有关啊,项目分了两个dex文件
如何解决呢
错误报告
你做了什么?
在宿主的的manifest中注册了service,这个service是在app.main中写的,并在其中的主activity中启动,
正常启动app,该service能正常启动并执行相关业务逻辑,但是bugly中会统计到这个bug,
@galenlin 请问有什么好的解决方法吗?
你期望的结果是什么?
不要在出现这个崩溃了。
实际结果是什么?
java.lang.RuntimeException:Unable to instantiate service com.appshare.android.app.main.services.GetMessageService: java.lang.ClassNotFoundException: Didn't find class "com.appshare.android.app.main.services.GetMessageService" on path: DexPathList[[zip file "/mnt/asec/com.appshare.android.ilisten-1/pkg.apk", zip file "/data/data/com.appshare.android.ilisten/code_cache/secondary-dexes/pkg.apk.classes2.zip"],nativeLibraryDirectories=[/mnt/asec/com.appshare.android.ilisten-/lib, /vendor/lib, /system/lib]] android.app.ActivityThread.handleCreateService(ActivityThread.java:2721) ...... Caused by: java.lang.ClassNotFoundException:Didn't find class "com.appshare.android.app.main.services.GetMessageService" on path: DexPathList[[zip file "/mnt/asec/com.appshare.android.ilisten-1/pkg.apk", zip file "/data/data/com.appshare.android.ilisten/code_cache/secondary-dexes/pkg.apk.classes2.zip"],nativeLibraryDirectories=[/mnt/asec/com.appshare.android.ilisten-1/lib, /vendor/lib, /system/lib]] dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:53) java.lang.ClassLoader.loadClass(ClassLoader.java:501) java.lang.ClassLoader.loadClass(ClassLoader.java:461) android.app.ActivityThread.handleCreateService(ActivityThread.java:2718) android.app.ActivityThread.access$1600(ActivityThread.java:171) android.app.ActivityThread$H.handleMessage(ActivityThread.java:1475) android.os.Handler.dispatchMessage(Handler.java:107) android.os.Looper.loop(Looper.java:194) android.app.ActivityThread.main(ActivityThread.java:5468) java.lang.reflect.Method.invokeNative(Native Method) java.lang.reflect.Method.invoke(Method.java:525) com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:936) com.android.internal.os.ZygoteInit.main(ZygoteInit.java:703) dalvik.system.NativeStart.main(Native Method)
Small环境
Compile-time
Bundles
Runtime