I have the following issue:
I have two projects: jre1.7 and android 2.1. I’d like to build first as a jar file and use it as framework in the second project. I’m using eclipse and I’ve done things I usually do when I add external jar. (Right Click on Project – Build Path – Add external Jars), and seems like everything’s fine, there are Referenced libraries folder appears and it contains jar.
But when I’m trying to compile Android project, it gives NoClassDefFound Error. Am I doing something wrong?
If you use Android SDK & ADT r17 or later, now Google recommended way of adding dependencies is:
Android SDK now automatically pick up and resolve dependencies for you, and you don’t need other manual setup anymore (add jar to project build path). Check out the r17 changelog:
In addition, It is not explicitly stated in official dev guide that Android now fully support java 7, it is better to stay with JDK 6 at the moment.
Hope this helps.