Build the Ionic 5 app for Android and upload it to the Play Store

Submitted by francesco on Thu, 10/29/2020 - 19:02

The basic documentation to understand the principles is in the Ionic docs.

The first step is creating a key to sign the file to upload to the Play Store:

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

The second step is setting your app to use this certificate.

Create a build.json file to put in your main folder:

 

{
"android": {
    "release": {
        "keystore": "MYFILE.keystore",
        "storePassword": "STORE-PASSWD",
        "alias": "KEY-ALIAS",
        "password" : "KEY-PASSWD", 
        "keystoreType": ""
    },
    "debug": {
        "keystore": "debug.keystore",
        "storePassword": "",
        "alias": "androiddebugkey",
        "password" : "", 
        "keystoreType": ""
    }
}
}