How to build .apk file from Windows command-line?

You can do it in command line (.bat) in windows using ant.

with: "ant release" You build the apk unsigned.

Then you need to add the call to "jarsigner" and "zipalign" in the bat to complete the task.

You can find an example of the command line to call these tools here: http://developer.android.com/guide/publishing/app-signing.html#signapp

Best,


I would suggest using Ant and the build files generated by the Android tools rather than trying to handroll your own. If nothing else, you can use the build files as a reference to determine how it uses the various tools to perform each step.

Tags:

Android

Apk