How Do I Publish An Updated Version Of My Existing Ionic App On Google Play Store?
Solution 1:
Start with changing the android-versionCode
, android-versionName
(optional) and version
attributes in the widget tag in your config.xml.
Then remove all plugins you only use for development, like console:
$ cordova plugin rm cordova-plugin-console --save
Build your release version:
$ cordova build --release android
Sign your release build with the key from your keystore. In below example the keystore is in the root of your project, but of course it's also possible to define another path:
$ jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore projectnaam.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk PROJECTNAAM_KEY
If you use for example Crosswalk, you might have more than one APK for different native platforms and will have to sign them separately (repeat above for each APK).
Zipalign your signed APK:
$ zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk platforms/android/build/outputs/apk/android-release.apk
And finally upload platforms/android/build/outputs/apk/android-release.apk
to the Play Store and publish the app.
After that you might want to install console plugin for further development:
$ cordova plugin add cordova-plugin-console --save
Solution 2:
You have to update versionCode and versionName in the app build.gradle.
Example: Suppose at the time of first app upload on playstore your version had:
versionCode 1
versionName "1.0"
Now, you have to change it (for make it next release version):
versionCode 2 versionName "1.1".
After that, in Android Studio, Click on Build-> Generate Signed Apk.
A popup appears with signed apk details such as keystore path, store password, key alias, key password. Fill those details and click on Next. After it select apk destination folder and select build type as release and then tap on Finish. You will get the release signed apk in the destination folder.
Open you google developer console, and select the application. Upload the new apk and publish it.
Solution 3:
- Update version in
config.xml
, you should have on the 2nd line selector , with these 2 attributes , modify them
Example:
FROMandroid-versionCode="10001" version="1.0.1"
TOandroid-versionCode="10002" version="1.0.2"
- To be extra safe and good practice, delete and add again the plaftorm you want to deploy
Example (for android):
cordova platform remove android
cordova platform add android
Build
ionic cordova build --release android
Copy your resulted apk , to root project (you cand find the build here
/platforms/android/app/build/outputs/apk/release/app-release-unsigned.apk
)Sign the release
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore android.keystore app-release-unsigned.apk android_app
6.Optimize the apk
zipalign -v 4 app-release-unsigned.apk app-release.apk
Solution 4:
Update version from config.xml
now run release command here
ionic cordova build android --release--prod
Post a Comment for "How Do I Publish An Updated Version Of My Existing Ionic App On Google Play Store?"