Skip to content

Deploy to Google Play

Neil edited this page May 10, 2017 · 5 revisions

Congrats on finishing 6MWD app, you are here because you are want to publish to Android devices on the Google Play Store

Home

Android deployment

  1. Make sure you are in the parent directory cd six-minute-walk-distance

  2. Build android for Prod/Release ionic build android --prod --release

  3. Take note of the apk path Built the following apk(s): /Users/computerName/Projects/six-minute-walk-distance/platforms/android/build/outputs/apk/android-release-unsigned.apk

  4. Generate a Key keytool -genkey -v -keystore sixmwd.keystore -keyalg RSA -keysize 2048 -validity 10000 -alias sixmwd

  5. Copy unsigned app from six-minute-walk-distance/platforms/android/build/outputs/apk/android-release-unsigned.apk to current folder (six-minute-walk-distance)

  6. Rename apk file to sixmwd-unsigned.apk (optional)

  7. Sign the APK jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore sixmwd.keystore sixmwd.apk sixmwd

  8. Optimise the APK with zipalign

Copy zipalign file ~/Library/Android/sdk/build-tools/VERSION/zipalign to current folder (six-minute-walk-test)

run the command with dot slash ./ so that the command will be ./zipalign -v 4 sixmwd-unsigned.apk sixmwd.apk

It should return Verification successful

  1. Verify (pending success)

Unfortunately I haven’t figured out how to verify with apksigner, I tried copying the apksigner file from the same folder as zipalign file but I get can’t find apksigner.jar error

Celebrate, you now have a signed apk file that you can upload to Google Play store