问题
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)
回答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.
来源:https://stackoverflow.com/questions/10850262/android-project-working-on-motodev-but-crashes-on-eclipse