Publishing Your Cordova App to the Play Store

You’re done! Now you want to publish? There’s a great resource here: http://ionicframework.com/docs/guide/publishing.html

But I’ll repost the instructions here, in case the page goes away.

First you need to build for release:

cordova build --release android

If you have a keystore file already you can skip the next part. Basically, google requires you to sign the app, they will use this public key to verify you on your updates, so make sure you keep the .keystore file around:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Next you need to sign it with the keystore file:

jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name

Now to the only trick part of this…

You need to “zipalign” your file:

zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

Just make sure you have access to the zipalign executable from your terminal, if you don’t you could do something like this:

~/Library/Android/sdk/build-tools/23.0.0/zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk

If you’re on a Mac that should work. Now go to the play store console: https://play.google.com/apps/publish/

You need to pay $25 to get into their developer program, once you’ve done it, you should be able to create a new app and upload your apk that you generated above.

One thought on “Publishing Your Cordova App to the Play Store

  1. Hi Ujjwal, I tried to install wathsapp the way you suggested on my samsung galaxy 10.1 tab (wifi only), but after installing wathsapp and pressing Agree and Continue’ I get a notification which says that my device can’t be identified and that I should close down my phone, remove the battery, reboot and try again Do you know how to fix this? Reply

Leave a Reply

Your email address will not be published. Required fields are marked *