Open jeffcharles opened 8 years ago
+1 I also encounter this error but after I upgrade to Android Studio 2.1.1. No kind of this error happen when I use Android Studio 1.5.
Calling this method:
@DebugLog
private void showAds() {
mAdView.loadAd(GlobalVar.adRequest);
}
will generate this error:
com.<redacted> E/AndroidRuntime: FATAL EXCEPTION: main java.lang.VerifyError: com/<redacted>/ContentsActivity$AjcClosure1 at com.<redacted>.content.ContentsActivity.showAds(ContentsActivity.java:71) at com.<redacted>.content.ContentsActivity.onCreate(ContentsActivity.java:51) at android.app.Activity.performCreate(Activity.java:4465) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1059) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1981) at android.app.ActivityThread.access$600(ActivityThread.java:123) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:137) at android.app.ActivityThread.main(ActivityThread.java:4429) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:511) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:795) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:562) at dalvik.system.NativeStart.main(Native Method)
Same thing for me, android studio 2.1.1, java-8-openjdk-amd64.
Some people solved this problem ?
Ok, I've met the same issue. After some research, I think it's related to instant run.
Disable instant run and try again, it should work.
android 4.4 having this issue android 5.0 it's ok
I have an activity that looks like:
and I get:
when running it. If I remove
@DebugLog
, everything works. This is usinghugo-plugin:1.2.1
, gradle 2.10, android gradle plugin 2.0.0, buildToolsVersion 24.0.0 rc3, running on Android 4.4.