Update an existing app on Android Play Store

I have followed the steps mentioned here
https://ionicframework.com/docs/v1/guide/publishing.html to publish my first version to google play store. Now, for updating, it is mentioned that i have to change the version number in config.xml.
Changed that and then performed

ionic cordova build --release android

What are the next steps to publish an update. I followed the same steps but messed up my keystore. Just trying to be careful.

This is what I do to update my app to android play store:

  1. Change version in config.xml
  2. Enter ionic cordova build --release android command
  3. Change cmd path to where you locate your java folder in your pc

(Example— C:\Program Files\Java\jdk1.8.0_161\bin)

  1. Enter command: jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore android_private_key.keystore app-release-unsigned.apk aliasname
    *you have generated the .keystore when you publish your app. Find the path of where you locate .keystore file last time

(Example— jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore C:\Users\Admin\android_private_key.keystore C:\Users\Admin\myapp\platforms\android\app\build\outputs\apk\release\app-release-unsigned.apk KeyAlias)

  1. Chang cmd path to C:\Users\Admin\AppData\Local\Android\Sdk\build-tools\27.0.3
  2. Enter command: zipalign -v 4 app-release-unsigned.apk NEWAPKNAME.apk

(Example ---- zipalign -v 4 C:\Users\Admin\myapp\platforms\android\app\build\outputs\apk\release\app-release-unsigned.apk C:\Users\Admin\MYNAME.apk)

  1. Upload MYNAME.apk to play store

You may need to change all the C:\Users\Admin path according to your own. Depends on where you locate your app folder.


Let me mention one CRITICAL thing, you MUST SIGN THE APP WITH THE SAME KEY. Otherwise you are unable to update that app. No exceptions.

1 Like