1. install JDK
2. download Apache Ant (apache-ant-1.9.2) and unzip it to a directory of your choice
3. open the android project in Processing, and go to File and Export Android Project. A folder is generated in the project folder called “android”.
4. open ant.bat in the text editor and make sure all the paths are directing to the right files or folders. In my case, when I ran ant release, ant was having problem finding java.exe. So in ant.bat, I found where _JAVACMD is set and change its value to:
C:\Users\user\Desktop\processing-2.0b9\java\bin\java.exe
This is kind of a hack but it works nicely for me.
5. Bring up command line or terminal, and set the following path first:
set path=%PATH%;C:\directory to your JDK\bin
set path=%PATH%;C:\directory to your android-sdk\tool
set path=%PATH%;C:\directory to your apache-ant-1.9.2\bin
6. Now the keytool (a JDK command) should work, create a key:
keytool -genkey -v -keystore nameOfMyKey.keystore -alias nameOfMyAlias -keyalg RSA -validity 10000
7. Find the file “nameOfMyKey.keystore” generated and move it into the android folder generated by Processing in your project folder for easy access.
8. Find ant.properties in the android folder, open it in the text editor, and add the following lines:
key.store=path/to/nameOfMyKey.keystore
key.alias=nameOfMyAlias
9. finally,ant release
, 2 apk will be generated 1 release and 1 release-unaligned, they both work for me. If there is error(s), check path variables in ant.bat.