I encountered NoClassDefFound when my app is running, as I have imported sth form a external jar file. The file is located in /libs and has been added to the java build path. I use Eclipse with android SDK. I have tried clean for many times.
Asked
Active
Viewed 60 times
0
-
1Its not added to build path. Also which external jar are you using? Need more info – Raghunandan Feb 25 '14 at 05:32
-
@Raghunandan I use httpmime. it has been added to the java build path in the properties of the projuect – hnhyzz Feb 25 '14 at 05:43
-
Just Add the jar to libs folder. Clean and Build your project once – Raghunandan Feb 25 '14 at 05:47
-
Restarting eclipse also works sometimes. Eclipse still show some bugs while updating dependencies. Restarting works in these cases – DroidDev Feb 25 '14 at 05:50
2 Answers
0
try this.
1. Your Project -> right click -> Properties -> Java Build Path -> Libraries -> Add Jar -> yourjar.jar
2. Your Project -> right click -> Properties -> Java Build Path -> Order & Export --> Select All --> OK

rajshree
- 790
- 5
- 19
-
Adding jar to libs folder will automatically add it to build path. Reference : http://stackoverflow.com/questions/15707024/android-eclipse-put-jar-in-libadd-to-build-path-vs-put-jar-in-libs – Raghunandan Feb 25 '14 at 05:34
0
Try adding lib to build path. Right click your lib in eclipse and add to build path.
Or go to projects properties in eclipse and in java - > java build path -> order and export ,just tick check box on your lib.
Update :: now just uninstall your app from device and clean and build project and run. (clean all projects if you have imported others)..... also build any other library project in eclipse if you have used it in your project.

Adhikari Bishwash
- 2,770
- 28
- 32
-
-
now just uninstall your app from device and clean and build project and run. (clean all projects if you have imported others)..... also build any other library project in eclipse if you have used it in your project. – Adhikari Bishwash Feb 25 '14 at 05:49
-