I upgraded Android Studio to 2.0.
Then when I run & debug the app, it works fine until I click a button and call a function, and java.lang.VerifyError is thrown. This is what I get from logcat:
E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.fronty.zt, PID: 18022
java.lang.VerifyError: com/fronty/zt/SilverCord$AjcClosure11
at com.fronty.zt.SilverCord.checkEmailExistence(SilverCord.java:407)
at com.fronty.zt.register.RegisterBasicActivity.onClick(RegisterBasicActivity.java:122)
at com.fronty.zt.register.RegisterBasicActivity$$ViewBinder$1.doClick(RegisterBasicActivity$$ViewBinder.java:26)
at butterknife.internal.DebouncingOnClickListener.onClick(DebouncingOnClickListener.java:22)
at android.view.View.performClick(View.java:4438)
at android.view.View$PerformClick.run(View.java:18422)
at android.os.Handler.handleCallback(Handler.java:733)
at android.os.Handler.dispatchMessage(Handler.java:95)
at android.os.Looper.loop(Looper.java:136)
at android.app.ActivityThread.main(ActivityThread.java:5001)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:785)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:601)
at dalvik.system.NativeStart.main(Native Method)
This is checkEmailExistence():
@DebugLog
public void checkEmailExistence(StringPacket pack, final Response.Listener<ResponseBase> listener, Response.ErrorListener errorListener)
{
request("checkEmailExistence", ResponseBase.class, listener, errorListener, "/api/v0/check_email_existence", pack);
}
But when I set a breakpoint and follow, it actually goes deeper before it throws. checkEmailExistence() calls request() and the exception is thrown at the first line inside request()
if ( doLog )
Log.i( T, function );
I tried deleting build dir, rebuild, clean.. & etc with no effect.
However, changing gradle version fixes the problem:
classpath 'com.android.tools.build:gradle:2.0.0'
to
classpath 'com.android.tools.build:gradle:1.5.0'
But this will disable Instant Run, so I would like to stick to 2.0.0. Does anyone know the cause or how to go about this?
Thanks!