android app icon

How to Create an Android Signed APK or AAB (Including Key Generation)

Creating a signed APK (Android Package Kit) or AAB (Android App Bundle) is an essential step in publishing an Android app on the Google Play Store. This guide will walk you through the entire process, including generating a new key for signing your app.

Step 1: Open Your Project in Android Studio

First, open your Android project in Android Studio. Make sure your project is ready for release by testing it thoroughly. Once you’re confident that everything is working, you can proceed to create a signed APK or AAB.

Step 2: Generate a New Signing Key

To sign your APK or AAB, you'll need a keystore file. If you don’t have one, follow these steps to generate a new one:

  1. In Android Studio, go to Build > Generate Signed Bundle / APK...
  2. In the pop-up window, select APK or Android App Bundle and click Next.
  3. If you don’t have an existing keystore, click on Create new....
  4. Choose a location for the new keystore file and create a secure password.
  5. Fill in the required fields for the key alias, key password, validity (how many years the key should be valid), and your personal details (name, organization, etc.).
  6. Once done, click OK to create the keystore file.

Step 3: Sign Your APK or AAB

After generating the keystore, you can now sign your APK or AAB:

  1. In the same window where you generated the key, select the path to your keystore file.
  2. Enter the password for the keystore and key alias.
  3. Choose Release as the build type. If you want to create a signed APK for testing purposes, you can choose Debug instead.
  4. Click Finish to start the build process.

Step 4: Locate Your Signed APK or AAB

Once the build process is complete, Android Studio will generate the signed APK or AAB. You can find the file in the following location:

  • For APK: project-directory/app/release/app-release.apk
  • For AAB: project-directory/app/release/app-release.aab

Step 5: Test Your Signed APK or AAB

Before uploading your APK or AAB to the Google Play Store, it's a good idea to test it on a physical device. Transfer the file to your device and install it to ensure everything works as expected.

Step 6: Upload to Google Play Console

Finally, upload your signed APK or AAB to the Google Play Console. Log in to your developer account, create a new release, and follow the instructions to upload the file. Once your app passes the review process, it will be available for download on the Google Play Store.

Verdict

Creating a signed APK or AAB for your Android app is a straightforward process that ensures your app is ready for distribution. By following these steps, you can securely sign your app and prepare it for release on the Google Play Store.