How to do it...

The following are the instructions:

  1. Go to your app folder and build for Android using the following command:
 $ ionic cordova build --release android
  1. You will note android-release-unsigned.apk in the /platforms/android/build/outputs/apk folder. Go to that folder in the Terminal:
  1. If this is the first time you created this app, you must have a keystore file. This file is used to identify your app for publishing. If you lose it, you cannot update your app later on. To create a keystore file, type the following command line and ensure that it's the same keytool version of the SDK:
$ keytool -genkey -v -keystore my-release-key.keystore ...

Get Ionic Cookbook - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.