Generating installers using the Cordova CLI
Now we are going to generate installers for Android and iOS using the Cordova CLI.
Android installer
First we are going to take a look at generating an installer for Android using the Cordova CLI. You can perform the following steps:
Open a new terminal/prompt at the root of the project.
Remove unwanted plugins:
ionic plugin rm cordova-plugin-console
Build the app in release mode:
cordova build --release android
This will generate an unsigned installer in release mode and place it at
/platforms/android/build/outputs/apk/android-release-unsigned.apk
.Next, we need to create a signing key. If you already have a signing key or you are updating an existing app, you can continue to Step 6.
The private key is generated using the key tool. We will create a folder named
deploy-keys
and then save all these keys there. Once the folder is created, using the cd command, go to the folder and run this:keytool -genkey -v -keystore app-name-release-key.keystore -alias...