IntelliJ IDEA 2016.2 Help

Packaging the Application

Once ready, an Android application is packaged as an .apk file. The package contains binaries as well as resources.

Android applications can be published in an application store, such as Google Play. To publish an application, you need to sign it digitally. Based on this signature, the Android system identifies the author of every deployed application. You do not need to apply for a personal signature to any authority, a signature generated by IntelliJ IDEA is quite sufficient.

To package and sign the application, perform the following steps:

  1. From the main menu, select Build | Generate Signed APK. The Generate Signed APK Wizard starts.
  2. On the first page, select the module that you want to package (HelloDroid) and click Next:
    android_apk_wizard_step1
  3. On the next page, click the Create new button to create a new keystore file with a new key.
    • In the New Key Store dialog box that opens, click the Browse button browseButton, select the folder where the newly generated keystore file will be located, and enter the name of the file.
    • Specify and confirm the password to access the keystore.
    • Configure the new release key by filling in the data in the Key area.
    android_apk_wizard_step2
  4. On the next step, in the Destination APK path text box, specify the folder where the .apk file will be saved. Optionally, select the Run ProGuard option if you want IntelliJ IDEA to obfuscate the application during the packaging procedure.
    android_apk_wizard_step3
  5. Click Finish to generate and sign the application package.

You can upload the resulting HelloDroid.apk file to an application store, or install it directly on devices configured to install applications from unknown sources.

See Also

Last modified: 5 September 2016