0

I moved an Eclipse-based Android project from another machine to the machine that I am working with. I imported the project using Android Project from Existing Source. Everything is working well when I code but when I deploy it using emulators and phones, it's producing weird exceptions. What might be the problem?

I have attached the exceptions produced with the questions for information.

12-06 08:15:20.957: E/AndroidRuntime(767): FATAL EXCEPTION: main
12-06 08:15:20.957: E/AndroidRuntime(767): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.innolabmm.discoverlioncity/com.innolabmm.discoverlioncity.FeedActivity}: java.lang.ClassNotFoundException: Didn't find class "com.innolabmm.discoverlioncity.FeedActivity" on path: /data/app/com.innolabmm.discoverlioncity-1.apk
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2106)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread.access$600(ActivityThread.java:141)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.os.Handler.dispatchMessage(Handler.java:99)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.os.Looper.loop(Looper.java:137)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread.main(ActivityThread.java:5041)
12-06 08:15:20.957: E/AndroidRuntime(767):  at java.lang.reflect.Method.invokeNative(Native Method)
12-06 08:15:20.957: E/AndroidRuntime(767):  at java.lang.reflect.Method.invoke(Method.java:511)
12-06 08:15:20.957: E/AndroidRuntime(767):  at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
12-06 08:15:20.957: E/AndroidRuntime(767):  at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
12-06 08:15:20.957: E/AndroidRuntime(767):  at dalvik.system.NativeStart.main(Native Method)
12-06 08:15:20.957: E/AndroidRuntime(767): Caused by: java.lang.ClassNotFoundException: Didn't find class "com.innolabmm.discoverlioncity.FeedActivity" on path: /data/app/com.innolabmm.discoverlioncity-1.apk
12-06 08:15:20.957: E/AndroidRuntime(767):  at dalvik.system.BaseDexClassLoader.findClass(BaseDexClassLoader.java:65)
12-06 08:15:20.957: E/AndroidRuntime(767):  at java.lang.ClassLoader.loadClass(ClassLoader.java:501)
12-06 08:15:20.957: E/AndroidRuntime(767):  at java.lang.ClassLoader.loadClass(ClassLoader.java:461)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.Instrumentation.newActivity(Instrumentation.java:1054)
12-06 08:15:20.957: E/AndroidRuntime(767):  at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2097)
12-06 08:15:20.957: E/AndroidRuntime(767):  ... 11 more
Sandah Aung
  • 6,156
  • 15
  • 56
  • 98

1 Answers1

1

Try this:

Go to Project/Properties/Java Build Path/Order and Export -- Make sure there's a check in front of Android Dependencies and the support library, if you use it.Mark all checkboxes and Click on Apply and clean the project.

Hope this helps.

Siddharth_Vyas
  • 9,972
  • 10
  • 39
  • 69
  • The problem persists and Eclipse is spewing out these exceptions. 12-06 08:44:06.674: E/AndroidRuntime(1277): java.lang.RuntimeException: Unable to instantiate activity ComponentInfo{com.innolabmm.discoverlioncity/com.innolabmm.discoverlioncity.FeedActivity}: java.lang.ClassNotFoundException: Didn't find class "com.innolabmm.discoverlioncity.FeedActivity" on path: /data/app/com.innolabmm.discoverlioncity-2.apk – Sandah Aung Dec 06 '13 at 08:45
  • Did you mark all check boxes, cleaned the project and then ran project? – Siddharth_Vyas Dec 06 '13 at 08:47