Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

运行sample就报错java.lang.VerifyError #31

Open
linuxhsj opened this issue Sep 5, 2017 · 1 comment
Open

运行sample就报错java.lang.VerifyError #31

linuxhsj opened this issue Sep 5, 2017 · 1 comment

Comments

@linuxhsj
Copy link

linuxhsj commented Sep 5, 2017

手机是【三星GALAXY S5 G9009D】
09-05 15:20:10.738 23232-23232/com.legend.demo D/AndroidRuntime: Shutting down VM 09-05 15:20:10.748 23232-23232/com.legend.demo E/AndroidRuntime: FATAL EXCEPTION: main Process: com.legend.demo, PID: 23232 java.lang.VerifyError: Verifier rejected class com.legend.demo.MainActivity$4 due to bad method void com.legend.demo.MainActivity$4.onClick(android.view.View) (declaration of 'com.legend.demo.MainActivity$4' appears in /data/app/com.legend.demo-1/split_lib_slice_1_apk.apk) at com.legend.demo.MainActivity.onCreate(MainActivity.java:61) at android.app.Activity.performCreate(Activity.java:6876) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1135) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3206) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3349) at android.app.ActivityThread.access$1100(ActivityThread.java:221) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1794) at android.os.Handler.dispatchMessage(Handler.java:102) at android.os.Looper.loop(Looper.java:158) at android.app.ActivityThread.main(ActivityThread.java:7225) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1230) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1120)

@LiYaHX
Copy link

LiYaHX commented Sep 17, 2019

有两种方法:
1. 取消 Instant Run 模式,参考链接:Split lib_slice_5_apk was defined multiple times
2. 更新 Android Studio 到 3.5 版本,该版本废弃了 Instant Run。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants