Create an Android Jar library for distribution
Android doesn't provide a special kind of Android-JAR. But what you can do is adding a build.xml to your project and build the JAR with ant.
My build.xml looks like this:
<project name="MyAndroidLib" default="dist" basedir="."> <description>This is my Android lib </description> <!-- set global properties for this build --> <property name="src" location="src" /> <property name="bin" location="bin" /> <target name="jar"> <jar destfile="MyAndroidLib.jar" basedir="bin/classes/"> <!-- replace 'com' by what ever you are using --> <!-- as first part of the package name --> <!-- e.g. de, org, ... --> <!-- the ** is important to include the directory recursively --> <include name="com/**" /> </jar> </target></project>
Build the JAR by running ant jar
in your projects main folder.