-
Navigate to the project folder
-
In the command line run
ionic build android --release
-
Then in the command line run
jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore my-release-key.keystore platforms/android/build/outputs/apk/android-release-unsigned.apk alias_name
Change "my-release-key.keystore" and "alias_name" to match your app. You may also need to change the name of the apk file.
Also, after the build process in step 2, you should see the path to your release apk at the bottom of the output.
-
The
zipalign -v 4 platforms/android/build/outputs/apk/android-release-unsigned.apk MyApp.apk
You may need to change the name of the apk file. The signed apk will be in the main folder unless you specify a different folder.
Run keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
Change "my-release.keystore" and "alias_name" to match your app and preferences.
Keep this file in a safe place. If you lose it you may be unable to upload revisions of your app to the store.
Run sudo ionic build android --release
In Platforms\Android add a file called lint.xml
Add the following to that file:
<?xml version="1.0" encoding="UTF-8"?>
<lint>
<issue
id="MissingTranslation"
severity="ignore" />
<issue
id="ExtraTranslation"
severity="ignore" />
</lint>
Important! This file will be deleted if you remove the android platform. By default it is ignored by git.
Make sure you have the Android SDK installed.
Make sure that the location of the Android SDK is in your path. Alternatively, you can copy the zipalign and jarsigner executables from the Android SDK folder (wherever you chose to install it) to your project folder.
Google play rejects it as not being signed. Even after following all this instructions. Any clue what is causing that?