Android - Build

Install ant (http://ant.apache.org) and setup environment variable JAVA_HOME:
Need JAVA_HOME var, if it contains spaces, so it like this in windows:

JAVA_HOME=c:\Progra~1\Java\<jdkdir>

Navigate to the root of your project directory (where the build.xml locates), and,

-ant debug:
Builds a debug package and signed by debug certficate and zipaligned

-ant release:
Build unsigned apk.
If it has the following settings in ant.properties file

key.store=path/to/my.keystore
key.alias=mykeystore
key.store.password=[password] (optional, if not, prompt for password)
key.alias.password=[password] (optional, if not, prompt for password)

It will output signed and zipaligned apk as well

-ant debug/release install:
This will build your application, sign it, and install it on the connecting emulator/device.

-ant installd:
Installs an already compiled debug package. This fails if the *-debug.apk is not already built.

-ant installr:
Installs an already compiled release package. This fails if the *-release.apk is not already built.

-ant clean:
Cleans the project


Install to devices/emulators:

adb (-s emulator-5554/-d) install (-r) path/to/your/app.apk