I\'m having a problem trying to run an Android app which, up until adding a second external library to its build path, was working fine. Since having added the scoreninja ja
John O'Connor is right with the issue. The problem stays with installing ADT 17 and above. Found this link for fixing the error:
http://android.foxykeep.com/dev/how-to-fix-the-classdefnotfounderror-with-adt-17
I tried everything from this post (and some other posts), and it didn't worked for me, this is by far the most terrible ADT upgrade I have experienced, and I will never upgrade without a working ADT backup.
I managed to solve it by removing the project, and then adding it again using a source backup I had.
please make sure your jar file is in the libs directory of your project in you are using newer ADT version with your eclipse.
As i understood, your Project shows no errors, because you included the Jar. But the Jar won't be used, when your Project got "exported" to the device. Try this
Project -> Properties
Java Build Path / Order and Export
[✔] Your Jar
I have encountered the same issue. The reason was that the library that I was trying to use had been compiled with a standard JDK 7.
I recompiled it with the -source 1.6 -target 1.6
options and it worked fine.
If you prefer to know which files the workaround is related to here's what I found. Simple change the .classpath file to
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="gen"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="output" path="bin/classes"/>
</classpath>
Replace the .classpath file in all library projects and in main android project. The .classpath file is in the root folder of the eclipse project. Of cause don't forget to add your own classpath entries, should you have any (so compare with your current version of .classpath).
I believe this is the same result as going through the eclipse menus as componavt-user explained above (Eclipse / Configure Build Path / Order and Export).