0

After updating my Android SDK today none of my projects are working anymore. Whenever I try to run a project in the emulator I get a NoClassDefFoundError for the main class of the project.

This class usually comes from another library project, that is linked with my main project (via right-click -> Properties -> Java Build Path -> Add...).

PS: all my JARs are in a "libs" folder, so that shouldn't be a problem...

Boris
  • 8,551
  • 25
  • 67
  • 120
  • 1
    First make sure that any JAR libraries are checked in `Properties -> Java Build Path -> Order and Export` (if they're there). Next make sure that `Properties -> Android` has the library (at the bottom). Lastly ensure that you have cleaned any libraries you have open in Eclipse, then clean the project you're compiling. – Cat Jul 18 '12 at 20:57
  • As I wrote below: my library project does not appear in the Android-add-dialog. The list is just empty. – Boris Jul 19 '12 at 05:14
  • [Try this once](http://stackoverflow.com/a/11824038/940096) – Praveenkumar Aug 06 '12 at 10:20

2 Answers2

2

You can also get this error if you have installed different versions of the JRE on the same machine. If you installed a previous version of the JRE for another program, its quite possible that you installed a newer version when you installed JDK. Just uninstall the older version and you should be good to go.

LoneRanger
  • 61
  • 3
1

Why don't you try add them as referenced projects in the Android section of the project properties.

Thomas Kaliakos
  • 3,274
  • 4
  • 25
  • 39
  • I tried that. But when trying to add something there, the list is just empty. Is there anything I have to do with my referenced library project, so that it appears in the android section? – Boris Jul 19 '12 at 05:13
  • It is opened in my workspace. So there must be some other problem? – Boris Jul 19 '12 at 11:08