Wednesday, May 29, 2013

java.lang.NoClassDefFoundError - Android

After updating the SDK and the ADT, when running your Android application, if you get the following error: java.lang.NoClassDefFoundError, make sure that "Android Private Libraries" and "Android Dependencies" are checked for Export.

To do so:

1) Right click on your project,  then Build Path, then Configure Build Path.



2) In the "Order and Export" tab, check the "Android Private Libraries" and "Android Dependencies" and then OK.



3) Then Clean and Build (if not done automatically).



4) Go to Android SDK Manager (located on Window menu) and verify that you have the Android SDK Build-tools installed, if not do it.



That's it.

6 comments: