Using Java libraries (jar’s) in Android applications
To use a Java library inside your Android project you can create a folder, e.g. “lib” and place your jar into this folder. Then right-click the jar and select “Build Path” -> Add to build path.
Of course you should keep your Android application as small as possible. Therefore you should only include classes in the jars which you really need.
You should be able to use this jar in your Android coding, e.g. your Activities.
To learn about Android programming please see Android Programming Tutorial.
August 24th, 2010 at 12:49 pm
Does it matter where the jar files were created? Is it better to just include the .java files you need directly into your project?
August 24th, 2010 at 1:27 pm
@Jeff both is possible, it is more a matter of taste.