2012-12-04

Build Android APK using command line by ANT

1. Create build.xml
Switch to your android project path, and input command:
android update project -p .
2.  This is optional, if you need sign key for your apk file. You need to create a property file for ANT sign procedure.
This property file contains:

key.store=path/to/your/key
key.store.password=yourkeypassword
key.alias=youraliasname
key.alias.password=youraliaspassword
3. Make sure your ANT is installed. Please refer to http://ant.apache.org/
If you're using Windows, add ANT_HOME and point to your ant path into your system environment variable.
Also add ANT_HOME\bin\ into your path system environment variable.
Build command is:
ant debug
For release and signed apk (ant will do sign procedure automatically):
ant release 

No comments: