I tried the accepted answer, but unfortunately it did not work. In fact, the jar was built successfully, but it was not built into apk when Eclipse built the project. That was when I called ZXing as a library project. I managed to write an ant script that works, so I share it here:
<?xml version="1.0" encoding="utf-8" ?> <project name="core" basedir="." default="dist" > <property name="dist.dir" value="dist" /> <property name="src.dir" value="src" /> <property name="build.dir" value="bin" /> <target name="dist" depends="clean, package" /> <target name="clean" > <delete dir="${build.dir}" /> </target> <target name="init" > <mkdir dir="${build.dir}" /> </target> <target name="compile" > <javac debug="off" destdir="${build.dir}" source="1.6" srcdir="${src.dir}" target="1.6" /> </target> <target name="package" depends="init, compile" > <jar basedir="${build.dir}" destfile="${dist.dir}/core.jar" /> </target> </project>
WonderCsabo Aug 08 '13 at 21:44 2013-08-08 21:44
source share