I have tried to figure out how to link library jars to my android project.
I created the build.xml with
android update project -p .
And I have defined ant.properties as
jar.libs.dir=lib
I also added a -pre-build task to copy some libs to the directory:
<target name="-pre-build">
<copy todir="${jar.libs.dir}">
<fileset
dir="absolute-path-from-my-dir"
includes="*.jar" />
</copy>
</target>
and this succeeds, since I can see this in the ant output:
-pre-build:
[copy] Copying 2 files to absolute-path-to-my-lib
However, I can also see this:
-build-setup:
[echo] Resolving Build Target for MyAndroidApp...
[gettarget] Project Target: Android 2.3.3
[gettarget] API level: 10
[echo] ----------
[echo] Creating output directories if needed...
[echo] ----------
[echo] Resolving Dependencies for MyAndroidApp...
[dependency] Library dependencies:
[dependency] No Libraries
[dependency]
[dependency] ------------------
[dependency] API<=15: Adding annotations.jar to the classpath.
and the javac task fails, since it cannot find classes that are in the libraries.
What am I missing?