atlas 示例程序执行gradlew assembleRelease构建后的apk运行出错

4jb9z9bj  于 5个月前  发布在  其他
关注(0)|答案(4)|浏览(54)

atlas-master\atlas-demo\AtlasDemo示例项目
执行gradlew assembleRelease构建后的apk运行出错,log如下(开启了debuggable true):

平台:windows 10,android studio2.3 手机:vivo v3

java.lang.NoSuchFieldException: bundleInfo
at java.lang.Class.getDeclaredField(Class.java:890)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.InitBundleInfoByVersionIfNeed(AtlasBundleInfoManager.java:485)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.getBundleInfo(AtlasBundleInfoManager.java:273)
at android.taobao.atlas.framework.Framework.startup(Framework.java:417)
at android.taobao.atlas.framework.Atlas.startup(Atlas.java:366)
at android.taobao.atlas.bridge.BridgeApplicationDelegate.onCreate(BridgeApplicationDelegate.java:406)
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:359)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
at android.taobao.atlas.runtime.InstrumentationHook.callApplicationOnCreate(InstrumentationHook.java:1048)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4685)
at android.app.ActivityThread.access$1600(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1432)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5388)
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:919)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)
java.lang.reflect.InvocationTargetException
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:359)
at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1018)
at android.taobao.atlas.runtime.InstrumentationHook.callApplicationOnCreate(InstrumentationHook.java:1048)
at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4685)
at android.app.ActivityThread.access$1600(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1432)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5388)
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:919)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)
Caused by: java.lang.RuntimeException: java.lang.RuntimeException: read bundleInfo failed
at android.taobao.atlas.framework.Atlas.startup(Atlas.java:368)
at android.taobao.atlas.bridge.BridgeApplicationDelegate.onCreate(BridgeApplicationDelegate.java:406)
... 15 more
Caused by: java.lang.RuntimeException: read bundleInfo failed
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.InitBundleInfoByVersionIfNeed(AtlasBundleInfoManager.java:502)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.getBundleInfo(AtlasBundleInfoManager.java:273)
at android.taobao.atlas.framework.Framework.startup(Framework.java:417)
at android.taobao.atlas.framework.Atlas.startup(Atlas.java:366)
... 16 more
java.lang.NoSuchFieldException: bundleInfo
at java.lang.Class.getDeclaredField(Class.java:890)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.InitBundleInfoByVersionIfNeed(AtlasBundleInfoManager.java:485)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.getBundleForComponet(AtlasBundleInfoManager.java:345)
at android.taobao.atlas.runtime.InstrumentationHook.callActivityOnCreate(InstrumentationHook.java:622)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)
at android.app.ActivityThread.access$900(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5388)
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:919)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.taobao.demo/com.taobao.splashscreen.WelcomeActivity}: java.lang.RuntimeException: read bundleInfo failed
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)
at android.app.ActivityThread.access$900(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5388)
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:919)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)
Caused by: java.lang.RuntimeException: read bundleInfo failed
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.InitBundleInfoByVersionIfNeed(AtlasBundleInfoManager.java:502)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.getBundleForComponet(AtlasBundleInfoManager.java:345)
at android.taobao.atlas.runtime.InstrumentationHook.callActivityOnCreate(InstrumentationHook.java:622)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
... 11 more
me: Shutting down VM
me: FATAL EXCEPTION: main
Process: com.taobao.demo, PID: 32072
java.lang.RuntimeException: 3.4.1
at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:323)
at android.os.Handler.dispatchMessage(Handler.java:98)
at android.os.Looper.loop(Looper.java:135)
at android.app.ActivityThread.main(ActivityThread.java:5388)
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:919)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714)
Caused by: java.lang.RuntimeException: Unable to start activity ComponentInfo{com.taobao.demo/com.taobao.splashscreen.WelcomeActivity}: java.lang.RuntimeException: read bundleInfo failed
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2436)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497)
at android.app.ActivityThread.access$900(ActivityThread.java:167)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371)
at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269)
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5388) 
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:919) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714) 
Caused by: java.lang.RuntimeException: read bundleInfo failed
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.InitBundleInfoByVersionIfNeed(AtlasBundleInfoManager.java:502)
at android.taobao.atlas.bundleInfo.AtlasBundleInfoManager.getBundleForComponet(AtlasBundleInfoManager.java:345)
at android.taobao.atlas.runtime.InstrumentationHook.callActivityOnCreate(InstrumentationHook.java:622)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2389)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2497) 
at android.app.ActivityThread.access$900(ActivityThread.java:167) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1371) 
at android.taobao.atlas.runtime.ActivityThreadHook.handleMessage(ActivityThreadHook.java:269) 
at android.os.Handler.dispatchMessage(Handler.java:98) 
at android.os.Looper.loop(Looper.java:135) 
at android.app.ActivityThread.main(ActivityThread.java:5388) 
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:919) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:714) 

webghufk

webghufk1#

补充系统版本:5.1.1

y3bcpkx1

y3bcpkx12#

补充:gradlew assembleDebug是没问题的

h6my8fg2

h6my8fg23#

混淆的问题吧,keep住试试?

a11xaf1n

a11xaf1n4#

我也遇到了,我想也是混淆问题,但要添加哪些混淆?我添加了-dontwarn android.taobao.atlas.**
-keep class android.taobao.atlas.**{*;} 依然不行

相关问题