How can I build and signed (keystore) the .apk file using 'apkbuilder.bat' via windows command-line ?
I try to run the following line:
apkbuilder.bat %APK_File_Name% -u -z %Project_Path%\bin\resources.ap_ -f %Project_Path%\bin\classes.dex -rf %Project_Path%
but I'm getting the following exception:
java.lang.ArrayIndexOutOfBoundsException: 1
at com.android.sdklib.build.ApkBuilderMain.main<ApkBuilderMain.java:61>
Please help. Thanks
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With