简体   繁体   中英

Building Android Project (Zxing) with ANT

I am new to Android and the Ant based build process. I want to build the project barcode scanner zxing hosted in the google code. I downloader the source and followed the build procedure in the wiki . The project builds at the root level but I get an error when I perform ant operation inside the android folder. The commands I used are as in wiki:

cd ../android 
ant debug 
ant install

The error is :

BUILD FAILED /Users/StackUnderflow/Projects/zxing-read-only/android/build.xml:98: Cannot find /path/to/android-sdk/tools/ant/build.xml imported from /Users/StackUnderflow/Projects/zxing-read-only/android/build.xml

How and where do I set the path to the android-sdk the ant build is looking for? The build process produces an ZXing-2.2.zip but how do I build an apk file to load in the device?

The error says it right there. You didn't follow this step, or rather, you didn't change the path!

echo "sdk.dir=/path/to/android-sdk" > local.properties

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM