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.

Tags:
Filed under: Android

Comments

  1. Jeff Gonzales Says:

    Does it matter where the jar files were created? Is it better to just include the .java files you need directly into your project?

  2. Lars Vogel Says:

    @Jeff both is possible, it is more a matter of taste.


Switch to our mobile site