java.lang.VerifyError: Verifier rejected class 问题解决

E/AndroidRuntime: FATAL EXCEPTION: main
                                                                   Process: com.test.clock, PID: 12410
                                                                   java.lang.VerifyError: Verifier rejected class com.test.widget.ClockActionDialog: java.lang.Object com.test.widget.ClockActionDialog.access$super(com.test.widget.ClockActionDialog, java.lang.String, java.lang.Object[]) failed to verify: java.lang.Object com.test.widget.ClockActionDialog.access$super(com.test.widget.ClockActionDialog, java.lang.String, java.lang.Object[]): [0x18A] 'this' argument 'Reference: com.test.widget.ClockActionDialog' not instance of 'Unresolved Reference: android.app.BaseDialog' (declaration of 'com.test.widget.ClockActionDialog' appears in /data/app/com.test-1/split_lib_slice_4_apk.apk)
                                                                       at com.test.AlarmClockFragment.deleteDialog(AlarmClockFragment.java:869)
                                                                       at com.test.AlarmClockFragment.access$1800(AlarmClockFragment.java:75)
                                                                       at com.test.AlarmClockFragment$9.onClick(AlarmClockFragment.java:466)
                                                                       at android.view.View.performClick(View.java:5648)
                                                                       at android.view.View$PerformClick.run(View.java:22463)
                                                                       at android.os.Handler.handleCallback(Handler.java:751)
                                                                       at android.os.Handler.dispatchMessage(Handler.java:95)
                                                                       at android.os.Looper.loop(Looper.java:154)
                                                                       at android.app.ActivityThread.main(ActivityThread.java:6223)
                                                                       at java.lang.reflect.Method.invoke(Native Method)
                                                                       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:891)
                                                                       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:781)



解决方案:

To do so:

  1. go to "File" > "Settings" > "Build, Execution, Deployment" > "Instant Run"
  2. uncheck the box "Enable Instant Run..." and click "OK" button
然后重新运行,就没有这个问题了

你可能感兴趣的:(Android)