Android – Include jar into apk with eclipse


I am trying to include a jar file in my apk file.

I tried the following:

    • copy the jar into lib directory in my project
    • add jar to path
    • enable the jar for export
    • simply add the jar to my project path (location anywhere else)
    • enable jar for export

But the apk does not include the jar. When I try to lanch the application the console tells me:

Please check logcat output for more details.
Launch canceled!

I'm using

Eclipse IDE for Java Developers
Version: Indigo Service Release 1
Build id: 20110916-0149


Android Development Toolkit
Version: 16.0.1.v201112150204-238534

This problem is solved. If I don't declare the libary as needed in the manifest it works.
(Strange behaviour)

Best Solution

Make sure your .JAR is created with JavaSE-1.6, not 1.7