2

I recently got a new computer, so I've been trying to move over all my development stuff. I installed Eclipse and then the Android plugin. It told me I needed to upgrade my SDK. Okay, I did so.

However, once I moved all my code over, correctly imported etc, I now get the following crash in my LogCat when I try to run the app:

09-10 10:27:42.260: E/AndroidRuntime(17444): FATAL EXCEPTION: main
09-10 10:27:42.260: E/AndroidRuntime(17444): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.bearwaves.uplift/com.bearwaves.uplift.MainActivity}: java.lang.ClassNotFoundException: com.bearwaves.uplift.MainActivity
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1993)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2104)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread.access$600(ActivityThread.java:132)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1157)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.os.Handler.dispatchMessage(Handler.java:99)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.os.Looper.loop(Looper.java:137)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread.main(ActivityThread.java:4575)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at java.lang.reflect.Method.invokeNative(Native Method)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at java.lang.reflect.Method.invoke(Method.java:511)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:789)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:556)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at dalvik.system.NativeStart.main(Native Method)
09-10 10:27:42.260: E/AndroidRuntime(17444): Caused by: java.lang.ClassNotFoundException: com.bearwaves.uplift.MainActivity
09-10 10:27:42.260: E/AndroidRuntime(17444):    at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.Instrumentation.newActivity(Instrumentation.java:1023)
09-10 10:27:42.260: E/AndroidRuntime(17444):    at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1984)
09-10 10:27:42.260: E/AndroidRuntime(17444):    ... 11 more

This is odd because my code hasn't changed at all. I tried moving everything over to a new project - twice - same result. The manifest works for my code when using the default 'Hello World' activity but not for the new code - I also suspect it's not a problem related to SD card because this occurs on the emulator also.

I'm confused as to what could have changed to the point where my code no longer functions.

Joel Auterson
  • 728
  • 1
  • 7
  • 26

1 Answers1

2

If you had any external libraries in your Java build path, you must include them in a libs folder.

meh
  • 22,090
  • 8
  • 48
  • 58