alibaba / atlas

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

应用无法启动,java.lang.RuntimeException: Unable to instantiate application android.core.atlas.startup.AtlasBridgeApplication: #341

Closed shadowline closed 5 years ago

shadowline commented 5 years ago

机型:中国移动N1Max Android 5.0.2 java.lang.RuntimeException: Unable to instantiate application android.core.atlas.startup.AtlasBridgeApplication: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at android.app.LoadedApk.makeApplication(LoadedApk.java:563) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489) at android.app.ActivityThread.access$1500(ActivityThread.java:144) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:135) at android.app.ActivityThread.main(ActivityThread.java:5219) 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:898) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693) Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException at android.core.atlas.startup.AtlasBridgeApplication.attachBaseContext(AtlasBridgeApplication.java:337) at android.app.Application.attach(Application.java:181) at android.app.Instrumentation.newApplication(Instrumentation.java:995) at android.app.Instrumentation.newApplication(Instrumentation.java:979) at android.app.LoadedApk.makeApplication(LoadedApk.java:558) at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489)  at android.app.ActivityThread.access$1500(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5219)  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:898)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)  Caused by: java.lang.reflect.InvocationTargetException at java.lang.reflect.Method.invoke(Native Method) at java.lang.reflect.Method.invoke(Method.java:372) at android.core.atlas.startup.AtlasBridgeApplication.attachBaseContext(AtlasBridgeApplication.java:335) at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:995)  at android.app.Instrumentation.newApplication(Instrumentation.java:979)  at android.app.LoadedApk.makeApplication(LoadedApk.java:558)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489)  at android.app.ActivityThread.access$1500(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5219)  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:898)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)  Caused by: java.lang.RuntimeException: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/core/atlas/framework/FrameworkProperties; at android.core.atlas.bridge.BridgeApplicationDelegate.attachBaseContext(BridgeApplicationDelegate.java:369) at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at android.core.atlas.startup.AtlasBridgeApplication.attachBaseContext(AtlasBridgeApplication.java:335)  at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:995)  at android.app.Instrumentation.newApplication(Instrumentation.java:979)  at android.app.LoadedApk.makeApplication(LoadedApk.java:558)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489)  at android.app.ActivityThread.access$1500(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5219)  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:898)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)  Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Landroid/core/atlas/framework/FrameworkProperties; at android.core.atlas.runtime.RuntimeVariables.getFrameworkProperty(RuntimeVariables.java:291) at android.core.atlas.bridge.BridgeApplicationDelegate.attachBaseContext(BridgeApplicationDelegate.java:361) at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at android.core.atlas.startup.AtlasBridgeApplication.attachBaseContext(AtlasBridgeApplication.java:335)  at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:995)  at android.app.Instrumentation.newApplication(Instrumentation.java:979)  at android.app.LoadedApk.makeApplication(LoadedApk.java:558)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489)  at android.app.ActivityThread.access$1500(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5219)  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:898)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)  Caused by: java.lang.ClassNotFoundException: Didn't find class "android.core.atlas.framework.FrameworkProperties" on path: DexPathList[[zip file "/data/app/cmccwm.mobilemusic-1/base.apk"],nativeLibraryDirectories=[/data/app/cmccwm.mobilemusic-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:469) at android.core.atlas.runtime.RuntimeVariables.getFrameworkProperty(RuntimeVariables.java:291)  at android.core.atlas.bridge.BridgeApplicationDelegate.attachBaseContext(BridgeApplicationDelegate.java:361)  at java.lang.reflect.Method.invoke(Native Method)  at java.lang.reflect.Method.invoke(Method.java:372)  at android.core.atlas.startup.AtlasBridgeApplication.attachBaseContext(AtlasBridgeApplication.java:335)  at android.app.Application.attach(Application.java:181)  at android.app.Instrumentation.newApplication(Instrumentation.java:995)  at android.app.Instrumentation.newApplication(Instrumentation.java:979)  at android.app.LoadedApk.makeApplication(LoadedApk.java:558)  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4489)  at android.app.ActivityThread.access$1500(ActivityThread.java:144)  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1339)  at android.os.Handler.dispatchMessage(Handler.java:102)  at android.os.Looper.loop(Looper.java:135)  at android.app.ActivityThread.main(ActivityThread.java:5219)  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:898)  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:693)  Suppressed: java.lang.ClassNotFoundException: android.core.atlas.framework.FrameworkProperties 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) ... 20 more Caused by: java.lang.NoClassDefFoundError: Class not found using the boot class loader; no stack available

hwjump commented 5 years ago

打包插件版本太低。建议升级到最新release版

ZhangKuixun commented 5 years ago

打包插件版本太低。建议升级到最新release版

我也遇到这个错了,现在版本是多少?我用的demo的版本:


lib_atlas_core = "com.taobao.android:atlas_core:5.1.0.9-rc26"
lib_atlas_update = "com.taobao.android:atlasupdate:1.1.4"