57 | | - Distribute the file {{{platforms/android/build/outputs/android-release-unsigned.apk}}} |
58 | | - @ToDo: Signing https://cordova.apache.org/docs/en/latest/guide/platforms/android/ |
| 57 | - File available as: {{{platforms/android/build/outputs/android-release-unsigned.apk}}} |
| 58 | - Sign the app: |
| 59 | * https://developer.android.com/studio/publish/app-signing.html |
| 60 | * https://cordova.apache.org/docs/en/latest/guide/platforms/android/ |
| 61 | {{{ |
| 62 | # Generate Private Key (just once) |
| 63 | # keytool comes with your JRE, so may need to ensure it's bin directory is in your PATH |
| 64 | keytool -genkey -v -keystore my-release-key.jks -keyalg RSA -keysize 2048 -validity 10000 -alias my-alias |
| 65 | # Optimise (zipalign comes with Android SDK build-tools, so may need to ensure it's in your PATH, e.g. %USERPROFILE%\AppData\local\android\sdk\build-tools\25.0.2) |
| 66 | zipalign -v -p 4 android-release-unsigned.apk android-release-unsigned-aligned.apk |
| 67 | # Sign (apksigner comes with Android SDK build-tools too) |
| 68 | apksigner sign --ks my-release-key.jks --out android-release.apk android-release-unsigned-aligned.apk |
| 69 | }}} |