Upload your first app on Google Playstore
1 ). we probably don’t want the debug console plugin enabled
ionic cordova plugin rm cordova-plugin-console
2 ). To generate a release build for Android, we can use the following cordova cli command:
ionic cordova build --release android
3 ). Let’s generate our private key using the keytool command that comes with the JDK.
(if you have .keytool then skip this command.)
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
4 ). To sign the unsigned APK, run the jarsigner tool which is also included in the JDK:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name
5 ). This signs the apk in place. Finally, we need to run the zip align tool to optimize the APK.
zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
NOTE : Before upload your .apk some important work to do. first check your APK version because
(a) Make sure you change apk version because if you do not change your apk version you can not upload your app.
(b) Your remember your .keytool password, if you forget your password or loss your .keytool then you don't able to update your apk.
ionic cordova plugin rm cordova-plugin-console
2 ). To generate a release build for Android, we can use the following cordova cli command:
ionic cordova build --release android
3 ). Let’s generate our private key using the keytool command that comes with the JDK.
(if you have .keytool then skip this command.)
keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
4 ). To sign the unsigned APK, run the jarsigner tool which is also included in the JDK:
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore HelloWorld-release-unsigned.apk alias_name
5 ). This signs the apk in place. Finally, we need to run the zip align tool to optimize the APK.
zipalign -v 4 HelloWorld-release-unsigned.apk HelloWorld.apk
NOTE : Before upload your .apk some important work to do. first check your APK version because
(a) Make sure you change apk version because if you do not change your apk version you can not upload your app.
(b) Your remember your .keytool password, if you forget your password or loss your .keytool then you don't able to update your apk.

Comments
Post a Comment