I have the same problems as in this question: Android unit test using ant with library project
I tried both methods that were suggested in the question, but in the r18 version for Android tools I get:
NTServicesTest/build.xml:110: Reference jar.libs.ref not found.
I’m not sure who did this if I didn’t follow the recipe for a workaround to answer the original question or something changed in r18 android tools.
my installation folder is in the proj folder that contains ..:
NTServices, NTServicesTest, NTServicesTestApp
@Snicolas workaround I changed my NTServicesTest / project.properties to look like this:
And my NTServicesTest / build.xml looks like this: (to the right of the version tag)
<import file="${sdk.dir}/tools/ant/build.xml" /> <target name="-compile" depends="-build-setup, -pre-build, -code-gen, -pre-compile"> <do-only-if-manifest-hasCode elseText="hasCode = false. Skipping..."> <condition property="extensible.classpath" value="${tested.project.absolute.dir}/bin/classes" else="."> <isset property="tested.project.absolute.dir" /> </condition> <condition property="extensible.libs.classpath" value="${tested.project.absolute.dir}/${jar.libs.dir}" else="${jar.libs.dir}"> <isset property="tested.project.absolute.dir" /> </condition> <echo message="jar libs dir : ${tested.project.target.project.libraries.jars}"/> <javac encoding="${java.encoding}" source="${java.source}" target="${java.target}" debug="true" extdirs="" includeantruntime="false" destdir="${out.classes.absolute.dir}" bootclasspathref="android.target.classpath" verbose="${verbose}" classpath="${extensible.classpath}" classpathref="jar.libs.ref"> <src path="${source.absolute.dir}" /> <src path="${gen.absolute.dir}" /> <classpath> <fileset dir="${tested.android.library.reference.1}/bin/" includes="*.jar"/> <fileset dir="${extensible.libs.classpath}" includes="*.jar" /> </classpath> <compilerarg line="${java.compilerargs}" /> </javac> <if condition="${build.is.instrumented}"> <then> <echo>Instrumenting classes from ${out.absolute.dir}/classes...</echo> <emma enabled="true"> <instr verbosity="${verbosity}" mode="overwrite" instrpath="${out.absolute.dir}/classes" outdir="${out.absolute.dir}/classes"> </instr> </emma> </then> </if> </do-only-if-manifest-hasCode> </target>
android unit-testing ant
havchr
source share