
(There are a few other ways to sign APKs. Now we have our final release binary called HelloWorld.apk and we can release this on the Google Play Store for all the world to enjoy!

To sign the APK: apksigner sign -ks my-release-key.keystore -ks-key-alias alias_name To zip align the APK: $ zipalign -v 4 HelloWorld.apk For example, on OS X with Android Studio installed, zipalign is in ~/Library/Android/Sdk/build-tools/VERSION/.

For this we use a couple of applications that can be found in the Android SDK build-tools folder, something like /path/to/Android/Sdk/build-tools/VERSION/. Next, we need to zip align and to sign the APK. Make sure to save this file somewhere safe and secure, if you lose it you won’t be able to submit updates to your app! Then, answer the rest of the nice tool’s questions and when it’s all done, you should have a file called my-release-key.keystore created in the current directory. You’ll first be prompted to create a password for the keystore. If this tool isn’t found, refer to the installation guide: $ keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 20000 Let’s generate our private key using the keytool command that comes with the JDK. If you already have a signing key, skip these steps and use that one instead. Now, we need to sign the unsigned APK and run an alignment utility on it to optimize it and prepare it for the app store.

Next, we find our unsigned APK file generated by the Android Studio. This will compile the web assets (and if “–ide” param is also specified, it will open up Android Studio IDE where you need to trigger a release build).

To generate a release build for Android, we can use the following Quasar CLI command: $ quasar build -m capacitor -T android So, you’ve finished working on your Mobile App.
