0

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!

Vincent
  • 3,191
  • 3
  • 29
  • 35
  • Could you please be more specific? When you say "I'm getting java.lang.VerifyError on Log.i() ", are you referring to a runtime error or a compilation error? – EJK Apr 11 '16 at 01:36
  • @EJK Sorry about that. It's a runtime error. I will add more description along with call stack. (rebuilding the app right now) – Vincent Apr 11 '16 at 01:46
  • @EJK I added more description. I thought it was a basic problem but it seems not.. – Vincent Apr 11 '16 at 02:04
  • Some upgrades to AS 2.0 apparently have problems with older projects. http://stackoverflow.com/questions/36522313/large-number-of-errors-during-gradle-build-after-upgrading-to-android-studio-2-0/36523016 – Doug Stevenson Apr 11 '16 at 03:36
  • @DougStevenson Yes. It seems *natural*. – Vincent Apr 11 '16 at 04:34

1 Answers1

1

I get the same error.I think it is hugo lead to the problem . Don't use @DebugLog,I run my app without the problem

Chikui Lee
  • 26
  • 1
  • I confirmed it. Removed all @DebugLog, and Voila!, it works! Thanks for taking your time to write the answer. – Vincent Apr 16 '16 at 00:57