Java.lang.verifyerror how do I fix or even find out the root cause?
Asked Answered
S

4

8

enter image description hereCurrently going through a nightmare attempting to fix a java.lang.verifyerror, was having issues with eclipse so I decided to uninstall and reinstall it, everything seemed normal until I tried to launch the app, thats when I noticed that I couldnt launch the app anymore, everytime I try to lauch it it crashes and gives me this error, however I have no clue what is causing it as the error log gives me little clues and I cant find any concrete answers on the internet, can anyone tell me what is wrong based on my logcat? any help will go a long way thanks

05-26 23:11:45.391: E/AndroidRuntime(624): FATAL EXCEPTION: main
05-26 23:11:45.391: E/AndroidRuntime(624): java.lang.VerifyError: com/vineline/second/OTweetApplication
05-26 23:11:45.391: E/AndroidRuntime(624):  at java.lang.Class.newInstanceImpl(Native Method)
05-26 23:11:45.391: E/AndroidRuntime(624):  at java.lang.Class.newInstance(Class.java:1319)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.Instrumentation.newApplication(Instrumentation.java:957)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.Instrumentation.newApplication(Instrumentation.java:942)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.LoadedApk.makeApplication(LoadedApk.java:477)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.ActivityThread.handleBindApplication(ActivityThread.java:3909)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.ActivityThread.access$1300(ActivityThread.java:122)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1184)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.os.Handler.dispatchMessage(Handler.java:99)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.os.Looper.loop(Looper.java:137)
05-26 23:11:45.391: E/AndroidRuntime(624):  at android.app.ActivityThread.main(ActivityThread.java:4340)
05-26 23:11:45.391: E/AndroidRuntime(624):  at java.lang.reflect.Method.invokeNative(Native Method)
05-26 23:11:45.391: E/AndroidRuntime(624):  at java.lang.reflect.Method.invoke(Method.java:511)
05-26 23:11:45.391: E/AndroidRuntime(624):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:784)
05-26 23:11:45.391: E/AndroidRuntime(624):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:551)
05-26 23:11:45.391: E/AndroidRuntime(624):  at dalvik.system.NativeStart.main(Native Method)
Sephira answered 26/5, 2013 at 23:23 Comment(2)
The dalvik.system.NativeStart.main method throws the error. Is this some class of yours or .. ?Sundried
I didnt make this class seems like a system thingSephira
L
15

This is a problem with ADT v22. It is pretty hard to fix. There are some suggestions here: The CommonsBlog - Don't Manually Modify Your Eclipse Build Path... Except Now for R22 (thanks to StreetsOfBoston and CommonswareGuy)

Logogriph answered 27/5, 2013 at 0:10 Comment(1)
simply, include the project in "order and export" that solve my problem.Ligon
S
1

So, as far as I'm aware, Android uses a different class file format and if you are running a third party JAR/Java files, you have to first run them through the dx tool that ships with the Android SDK.

Other possible reason may probably be some method in a java.lang class that is not supported on the Android SDK level you are using (for instance, String.isEmpty()).

Sundried answered 26/5, 2013 at 23:29 Comment(6)
how does the dx tool work? I have never had to use this up until today is this a new requirement?Sephira
Also how would I know if that is the problem, eclipse isnt giving me any clues as to anythingSephira
You can find info about the dx tool here: developer.android.com/tools/helpSundried
Also, Look in the Library section of the Android project preferences, below the list of SDK versions. Do your external projects you're relying on in your build show up there, with a green tick next to them?Sundried
they are there but no green tick, does this mean they arent in teh build path?Sephira
Updated my question with a screenshot of my librarySephira
S
0

If the answer by @G. Blake Meike doesn't work for you for whatever reason, here's another way of fixing it.

  1. Right Click Project > Build Path > Configure Build Path
  2. Click on Android on left
  3. On right select any other Target Name/API other than 4.2.2 since it seems that's with problems.
  4. Hit OK (At this point it rebuilds your projects with the selected API)
  5. Run the Application

Hope that helps.

Schizont answered 27/6, 2014 at 17:23 Comment(0)
E
0

I just enabled the 3rd party library in the "Import and export" TAB of configuring build path.

enter image description here

Eam answered 11/12, 2014 at 9:40 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.