alibaba / atlas

A powerful Android Dynamic Component Framework.
Apache License 2.0
8.13k stars 1.48k forks source link

[use]:使用kotlin写Application 启动直接crash #242

Closed candledragle closed 6 years ago

candledragle commented 6 years ago
01-31 18:54:34.269 5626-5626/com.duia.duiba E/CrashManager: force stop
01-31 18:54:34.279 5626-5626/com.duia.duiba E/AndroidRuntime: FATAL EXCEPTION: main
                                                              Process: com.duia.duiba, PID: 5626
                                                              java.lang.RuntimeException: Unable to create application android.taobao.atlas.startup.AtlasBridgeApplication: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Can't find class com.duia.duiabang.application.BangApplicationinstalled bundles: 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4546)
                                                                  at android.app.ActivityThread.access$1500(ActivityThread.java:147)
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102)
                                                                  at android.os.Looper.loop(Looper.java:135)
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5248)
                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:372)
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909)
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704)
                                                               Caused by: java.lang.RuntimeException: java.lang.RuntimeException: java.lang.ClassNotFoundException: Can't find class com.duia.duiabang.application.BangApplicationinstalled bundles: 
                                                                  at android.taobao.atlas.startup.AtlasBridgeApplication.onCreate(AtlasBridgeApplication.java:364)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011)
                                                                  at android.taobao.atlas.runtime.InstrumentationHook.callApplicationOnCreate(InstrumentationHook.java:1069)
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4543)
                                                                  at android.app.ActivityThread.access$1500(ActivityThread.java:147) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:135) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5248) 
                                                                  at java.lang.reflect.Method.invoke(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
                                                               Caused by: java.lang.RuntimeException: java.lang.ClassNotFoundException: Can't find class com.duia.duiabang.application.BangApplicationinstalled bundles: 
                                                                  at android.taobao.atlas.bridge.BridgeApplicationDelegate.onCreate(BridgeApplicationDelegate.java:492)
                                                                  at java.lang.reflect.Method.invoke(Native Method)
                                                                  at java.lang.reflect.Method.invoke(Method.java:372)
                                                                  at android.taobao.atlas.startup.AtlasBridgeApplication.onCreate(AtlasBridgeApplication.java:362)
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011) 
                                                                  at android.taobao.atlas.runtime.InstrumentationHook.callApplicationOnCreate(InstrumentationHook.java:1069) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4543) 
                                                                  at android.app.ActivityThread.access$1500(ActivityThread.java:147) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:135) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5248) 
                                                                  at java.lang.reflect.Method.invoke(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
                                                               Caused by: java.lang.ClassNotFoundException: Can't find class com.duia.duiabang.application.BangApplicationinstalled bundles: 
                                                                  at android.taobao.atlas.runtime.DelegateClassLoader.findClass(DelegateClassLoader.java:270)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:469)
                                                                  at android.taobao.atlas.runtime.DelegateClassLoader.loadClass(DelegateClassLoader.java:248)
                                                                  at android.taobao.atlas.bridge.BridgeApplicationDelegate.onCreate(BridgeApplicationDelegate.java:428)
                                                                  at java.lang.reflect.Method.invoke(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                  at android.taobao.atlas.startup.AtlasBridgeApplication.onCreate(AtlasBridgeApplication.java:362) 
                                                                  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1011) 
                                                                  at android.taobao.atlas.runtime.InstrumentationHook.callApplicationOnCreate(InstrumentationHook.java:1069) 
                                                                  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4543) 
                                                                  at android.app.ActivityThread.access$1500(ActivityThread.java:147) 
                                                                  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346) 
                                                                  at android.os.Handler.dispatchMessage(Handler.java:102) 
                                                                  at android.os.Looper.loop(Looper.java:135) 
                                                                  at android.app.ActivityThread.main(ActivityThread.java:5248) 
                                                                  at java.lang.reflect.Method.invoke(Native Method) 
                                                                  at java.lang.reflect.Method.invoke(Method.java:372) 
                                                                  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:909) 
                                                                  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:704) 
                                                                Suppressed: java.lang.ClassNotFoundException: Didn't find class "com.duia.duiabang.application.BangApplication" on path: DexPathList[[zip file "/data/app/com.duia.duiba-1/base.apk"],nativeLibraryDirectories=[/data/app/com.duia.duiba-1/lib/arm, /vendor/lib, /system/lib]]
                                                                  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:56)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:511)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                        ... 18 more
                                                                    Suppressed: java.lang.ClassNotFoundException: com.duia.duiabang.application.BangApplication
                                                                  at java.lang.Class.classForName(Native Method)
                                                                  at java.lang.BootClassLoader.findClass(ClassLoader.java:781)
                                                                  at java.lang.BootClassLoader.loadClass(ClassLoader.java:841)
                                                                  at java.lang.ClassLoader.loadClass(ClassLoader.java:504)
                                                                            ... 19 more
                                                               Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available
candledragle commented 6 years ago

将kotlin写的Application换成java写的通过

lilongAAAA commented 6 years ago

能把用kotlin写的apk发我看看吗

candledragle commented 6 years ago

@lilongAAAA 反编译apk 你会发现自己写的Application类 没有存在dex 包中,demo很小不存在多个dex的情况