1

I am getting VerifyError for method calling of paticular class Utility ,first it was working properly and suddenly its started giving run time error, it is working fine with API lollipop and higher API , Here is my error logs.

06-08 12:25:07.655: E/AndroidRuntime(18117): FATAL EXCEPTION: main
06-08 12:25:07.655: E/AndroidRuntime(18117): java.lang.VerifyError: com/package/projectname/utility/Utility
06-08 12:25:07.655: E/AndroidRuntime(18117):  at com.package.projectname.AppDelegate.onCreate(AppDelegate.java:36)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1017)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4575)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.app.ActivityThread.access$1400(ActivityThread.java:153)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1346)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.os.Handler.dispatchMessage(Handler.java:99)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.os.Looper.loop(Looper.java:176)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at android.app.ActivityThread.main(ActivityThread.java:5302)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at java.lang.reflect.Method.invokeNative(Native Method)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at java.lang.reflect.Method.invoke(Method.java:511)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1102)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:869)
06-08 12:25:07.655: E/AndroidRuntime(18117):  at dalvik.system.NativeStart.main(Native Method)
7
  • post your Utility class and the method that gives VerifyError Commented Jun 8, 2016 at 7:08
  • see if the cases listed here covers your situation. Commented Jun 8, 2016 at 7:08
  • @manish jain , for all methods its giving error, like printing log also Commented Jun 8, 2016 at 7:31
  • what is your app buildToolsVersion? Commented Jun 8, 2016 at 7:38
  • @manish jain 23 Marhsmallow Commented Jun 8, 2016 at 7:48

1 Answer 1

1

I solved this error by placing gms library separately:

Before I have used :

compile 'com.google.android.gms:play-services:8.1.0'

That above one line will take care of GCM and all google related libaries.But this one line cause a verifier error.On top of the verifier error you can see some gms related log.

After that I have added separately like this to fix this issue :

 compile 'com.google.android.gms:play-services-location:8.1.0'
 compile 'com.google.android.gms:play-services-base:8.1.0'
 compile 'com.google.android.gms:play-services-analytics:8.1.0'
 compile 'com.google.android.gms:play-services-maps:8.1.0'

 compile "com.google.android.gms:play-services-gcm:8.1.0'    // for gcm push notification

and also Check this

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.