Importing external .jar file to Android project [duplicate]

Put the JAR in your project’s libs/ directory. Then Build Path -> Library -> Add JAR should allow you to pick the one out of your project. IIRC, this works with Eclipse.

If you decide someday to dump Eclipse, just having your JAR in libs/ is enough — the command-line build tools will pick it up automatically.

UPDATE: If you have the R17 or newer version of the ADT Eclipse plugin, now you only need to add a libs/ directory and put your JAR in there. It will automatically be added to your build path, much like with command-line builds.

Leave a Comment