Proper way to sign an APK built with Cordova/Phonegap 3.0 without using Eclipse

5,249 views
Skip to first unread message

Rafael Agostini

unread,
Sep 2, 2013, 10:51:24 AM9/2/13
to phon...@googlegroups.com
Hi,

Everytime I use the command:
$ cordova build android

It builds some APK files like: AppName-unaligned.apk and AppName-debug.apk, so, how can I tell Cordova/Phonegap to sign an APK without using Eclipse and what APK I need to sign, unaligned or debug one?

And, did you know if there's a way to automate that signed-APK export?

WebSteve

unread,
Sep 3, 2013, 11:00:25 AM9/3/13
to phon...@googlegroups.com

Lokesh G

unread,
Nov 7, 2014, 7:23:36 AM11/7/14
to phon...@googlegroups.com

Ronald K

unread,
Nov 7, 2014, 5:27:05 PM11/7/14
to phon...@googlegroups.com
Untested, but this should do the job:

1. in platforms/android/, create a file called ant.properties, and add your keystore path and alias name:
     key.store=/path/to/keystore/keystore_name.keystore
     key.alias=alias_name
2. run 
    cordova build android --release 

It should prompt for the keystore password. The resulting APK will be at platforms/android/ant-build/AppName-release.apk.

Op maandag 2 september 2013 16:51:24 UTC+2 schreef Rafael Agostini:
Reply all
Reply to author
Forward
0 new messages