1) Build your android app : i
ionic cordova build android --release
2) Move to the platforms folder:
cd platforms/android
3) Build a bundle (Since playstore might not accept apk)
./gradlew bundle
4) Move to the folder with the .aab file
cd app/build/outputs/bundle/release
5) Sign your release
5.a) Generate a key
keytool -genkey -v -keystore my-app-key.keystore -alias appalias -keyalg RSA -keysize 2048 -validity 10000
5.b) Sign your bundle
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-app-key.keystore app-release.aab appalias
5.c ) Move to the Android sdk build tools
cd $ANDROID_HOME/build-tools/29.0.3
5.d) Use zipalign to generate a signed package of your bundle
./zipalign -v 4 ~/Documents/mobileapps/app/platforms/android/app/build/outputs/bundle/release/app-release.aab ~/Documents/mobileapps/app/platforms/android/app/build/outputs/bundle/release/signed_release.aab
No comments:
Post a Comment