Android - VerifyError

2019-07-20 02:31发布

问题:

this is an error I am getting in Android Developer Console from hundreds of my users.

I've spend entire day trying to fix the issue in code and it took 9 releases and I am still getting these error reports. My application has about 5 thousand downloads a day and on about 10% of the devices it's crashing. Rating of my application went down from 4.7 to 3.0 in just one day because of this.

I literally can't figure this out.

I am at the point of letting someone actually remote connect to my machine and pay to look at it.

Anyhow, long story short. I've done an update in code last night and I've uninstalled google ads from my app. Added little bit of code and released app to android market. This morning I had 200 error reports. App is crashing on many devices.

I went to error reports and this is what most people are getting:

java.lang.VerifyError: a.xml.a$Searching
at a.xml.a.startTalkingActivity(a.java:849)
at a.xml.a.onActivityResult(a.java:1053)
at android.app.Activity.dispatchActivityResult(Activity.java:3890)
at android.app.ActivityThread.deliverResults(ActivityThread.java:3511)
at android.app.ActivityThread.handleSendResult(ActivityThread.java:3557)
at android.app.ActivityThread.access$2800(ActivityThread.java:125)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2063)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:123)
at android.app.ActivityThread.main(ActivityThread.java:4627)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:521)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618)
at dalvik.system.NativeStart.main(Native Method)

I've put ads back in, but error keep coming. I've removed code I've added, error still there and getting more angry reviews complaining of crashing on a button press.

I am going crazy here, I'd appreciate any help with this. I can't figure out what this error means.

回答1:

You appear to have a Searching inner class of the a.xml.a class. That Searching inner class is referring to something that does not exist on the users' devices, even though it existed in your build target.

You might temporarily drop your build target to be the same as your minSdkVersion (if it isn't there already) and see if anything turns up in this class.

Beyond that, try to find common characteristics of the devices on which the app is failing (e.g., OS version).



回答2:

I just wanted to give my solution to this problem, since I haven't really found this anywhere else.

I was able to solve the issue by double-checking the build path of the project. I always get the error when I forget to export external libraries. Hope this helps someone :-)



回答3:

I've fixed the issue, had to cut the class to smaller chunks, it was too long.



回答4:

I had the same problem after doing the Android ADT and Java updates. Try these steps:

  1. Remove links to your external libraries in your Android project.
  2. Move all your external libraries (including Google Ad libraries) to \libs folder inside your Android project.
  3. Re-link your libraries, that now exist in the Project\libs directory.