0

I made an android project on Motodev (which is an eclipse plugin itself). But now when I am trying to run the same project on eclipse, the emulator gives me an error the following error:

FATAL EXCEPTION: main E/AndroidRuntime(4711): java.lang.VerifyError: com.tenpearls.namecalling.Activities.SearchContactsActivity
E/AndroidRuntime(4711):  at java.lang.Class.newInstanceImpl(Native Method)
E/AndroidRuntime(4711):  at java.lang.Class.newInstance(Class.java:1429)
E/AndroidRuntime(4711):  at android.app.Instrumentation.newActivity(Instrumentation.java:1021)
E/AndroidRuntime(4711):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2577)
E/AndroidRuntime(4711):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2679)
E/AndroidRuntime(4711):  at android.app.ActivityThread.access$2300(ActivityThread.java:125)
E/AndroidRuntime(4711):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2033)
E/AndroidRuntime(4711):  at android.os.Handler.dispatchMessage(Handler.java:99)
E/AndroidRuntime(4711):  at android.os.Looper.loop(Looper.java:123)
 E/AndroidRuntime(4711):  at android.app.ActivityThread.main(ActivityThread.java:4627)
E/AndroidRuntime(4711):  at java.lang.reflect.Method.invokeNative(Native Method)
E/AndroidRuntime(4711):  at java.lang.reflect.Method.invoke(Method.java:521)
E/AndroidRuntime(4711):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(4711):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:626)
E/AndroidRuntime(4711):  at dalvik.system.NativeStart.main(Native Method)
Paresh Mayani
  • 127,700
  • 71
  • 241
  • 295
SoH
  • 2,180
  • 2
  • 24
  • 53
  • See this answer http://stackoverflow.com/questions/100107/reasons-of-getting-a-java-lang-verifyerror – user Jun 01 '12 at 12:41

1 Answers1

1

That can be the result when you have compiled against a different library than you are using at runtime.

A good explanation can be had here.

Another possibility is having a duplicate class in the classpath somewhere, such as in a library jar.

Community
  • 1
  • 1
Barak
  • 16,318
  • 9
  • 52
  • 84
  • but if I try to run the app on an actual device from the same Eclipse environment it runs perfectly. The problem is running it on the eclipse emulator. – SoH Jun 01 '12 at 12:52
  • I'm not familiar with how Motodev works... Does it have it's own emulator? Do you have the latest dev tools for Eclipse? Does Motodev override any standard android classes? – Barak Jun 01 '12 at 12:56
  • Dont think it overrides any android classes. Motodev infact is a plugin in in eclipse. So dont think the problem should occur. – SoH Jun 01 '12 at 13:00
  • MOTODEV Studio doesn't do anything in this case beyond what Eclipse is doing. The emulator is launched from the IDE, just like Eclispe does. Are you using different workspaces for Eclipse and MOTODEV Studio? If so, @Barak probably is probably correct. FWIW, the workspaces are interoperable, so try opening the workspace that "works" in MOTODEV Studio with Eclipse. – Eric Cloninger Jun 01 '12 at 20:43