简体   繁体   中英

FATAL EXCEPTION: main java.lang.VerifyError

I'm testing my application on various emulators Kindle Fire, but on this tablet I have big problems. The app is always crashes with the following LogCat:

E/AndroidRuntime(368):  FATAL EXCEPTION: main
E/AndroidRuntime(368):  java.lang.VerifyError: it.bisemanuDEV.mathTools.Calculator
E/AndroidRuntime(368):  at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(368):  at java.lang.Class.newInstance(Class.java:1409)
E/AndroidRuntime(368):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(368):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1561)
E/AndroidRuntime(368):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1663)
E/AndroidRuntime(368):  at android.app.ActivityThread.access$1500(ActivityThread.java:117)
E/AndroidRuntime(368):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:931)
E/AndroidRuntime(368):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(368):  at android.os.Looper.loop(Looper.java:130)
E/AndroidRuntime(368):  at android.app.ActivityThread.main(ActivityThread.java:3683)
E/AndroidRuntime(368):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(368):  at java.lang.reflect.Method.invoke(Method.java:507)
E/AndroidRuntime(368):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:839)
E/AndroidRuntime(368):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:597)
E/AndroidRuntime(368):  at dalvik.system.NativeStart.main(Native Method)

You first look at LogCat and see what's causing the verifyerror.

It's probably some method in a java.lang class that is not supported on the android SDK level you are using.

for more information refer this link . Hope this helpful to you.

Some methods in your class are not supported on a lower version of SDK that you might be using. Remove any @Supresslint or @targetApi annotations that you might have over your class or a particular method in your class and eclipse will mark those methods for you which needs a particular minimum level of SDK.

I had the same problem and I solved that going for exclusion of cases.

But basically the are three main reasons in which you can get this error:

  1. (In my case) I was getting the VerifyError all the time that I tried to run my app on devices with API Level under 10 , because I was trying to catch an SQLiteDatabaseLockedException that are supported from the Android API Level 11. So to solve it check that every Exception or possible method (ie String.isEmpty() is supported from API Level 9) is supported form your minimum API Level.

  2. While I was searching for a solution I found a lot of people that got the VerifyError because there was some problem with Libraries Imports, as explained in this post: http://commonsware.com/blog/2013/05/23/do-not-manually-modify-eclipse-build-path-except-now-r22.html

  3. See the sayed.jalil answer.

Hope that will help!

Bye Bye! Caterpillar.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM