When trying to run ionic cordova run android --prod --release I get the following error
Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES]
Sign the build using '-- --keystore' or '--buildConfig' or sign and deploy the unsigned apk manually using Android tools.
[ERROR] An error occurred while running cordova run android --keystore=platforms/android/keystore/my-release-key.jks
--s... (exit code 1).
I also have no problem in generating the signed .apk builds using the manual method, however I was wondering if I would be able to get ionic cordova run android --prod --release to work
What i’ve done, and what I believe to still be in good/decent practice(?), is create a build.json file at the root of my project and fill it with:
{
"android": {
"release": {
"keystore": "name-of-your.keystore",
"storePassword": "super-awesome-password",
"alias": "alias you entered in your keystore",
"password" : "super-awesome-password",
"keystoreType": "JKS"
}
}
}
Then you can run ionic cordova build android --prod --release and it’ll sign and zipalign it.
Alternatively, based on the message you’re getting, I’d imagine you can do: ionic cordova build android --prod --release -- --keystore name-of-your.keystore and it’ll ask for all this information. Though I haven’t tested this theory yet.