I have an Android project that built and ran perfectly before Eclipse crashed and corrupted the workspace.
Eclipse would not start until I deleted(moved) the .metadata folder from the workspace folder.
Now, the project will build fine and install on my device but when it starts I get the following error on LogCat:
Any idea on how I could fix?
FATAL EXCEPTION: main
java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.conor.app/com.conor.app.StartActivity}: java.lang.ClassNotFoundException: com.conor.app.StartActivity
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1983)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2084)
at android.app.ActivityThread.access$600(ActivityThread.java:130)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1195)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loop(Looper.java:137)
at android.app.ActivityThread.main(ActivityThread.java:4745)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:511)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:786)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.ClassNotFoundException: com.conor.app.StartActivity
at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
at android.app.Instrumentation.newActivity(Instrumentation.java:1053)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1974)
Ok, so I solved the problem. It seemed that deleting the .metadata folder would let Eclipse start again but the project seemed a bit messed up.
My solution is as follows:
Delete
.metadatafolder from workspaceMove all projects out of workspace to some other place (temporary location)
Start up eclipse and select your workspace. This will rebuild the
.metadatafolderFrom Eclipse import all your projects that are contained in the temporary location
Hope it helps if you’ve had this problem