How do i publish an updated version of my existing ionic app on google play store?

那年仲夏 提交于 2019-12-24 07:51:42

问题


I have recently launched my first ionic app on play store and now i want to publish a updated version.

I have the .keystore file and its password with me but i am not getting the steps to generate the release apk to update my existing ionic app.

I would appreciate a help. Thanks


回答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



回答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.



来源:https://stackoverflow.com/questions/42290083/how-do-i-publish-an-updated-version-of-my-existing-ionic-app-on-google-play-stor

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!