how to make unity aab build aab format unity create aab why unity build not working

How To Make Unity AAB Build

If you’re developing mobile games, knowing how to make Unity AAB Build is essential—especially if you’re targeting the Google Play Store. Since 2021, Google has made Android App Bundles (AAB) the required publishing format for new apps, replacing the traditional APK. This guide will walk you through everything you need to know to successfully create and troubleshoot the build, even if you’re just getting started.

Unlike APKs, AAB files allow Google Play to optimize the app for different device configurations, leading to smaller download sizes and improved performance. Understanding the AAB workflow in Unity ensures you meet publishing requirements while delivering a smoother experience to your players. From setting up the build environment to managing keystores and Gradle settings, each step plays a vital role in the success of your final release.

What is an AAB File and Why It Matters

Before diving into the steps of building, let’s first understand what an AAB file is. An Android App Bundle (AAB) is a publishing format introduced by Google that contains all your app’s compiled code and resources, but defers APK generation and signing to Google Play. This allows users to download only the parts of your app that are needed for their specific device configuration, reducing download size and improving performance.

If you’re submitting an app to Google Play, you’re now required to use the AAB format, especially for new apps. Updating your knowledge on how to produce this build format in Unity is critical.

How to Enable AAB Format Unity Support

To generate an AAB build in Unity, make sure you’re using Unity 2018.3 or later, as older versions do not support this feature. Also, ensure that your project is properly configured for Android.

Steps to Prepare Your Unity Project:

  1. Open Your Project in Unity.

  2. Go to Build Settings (File > Build Settings).

  3. Select Android as your platform and click Switch Platform.

  4. Under the “Build System,” select Gradle (AAB requires Gradle).

  5. Click on Player Settings and under Publishing Settings, make sure your keystore and key alias are configured (required for building AABs).

  6. In the Build Settings, check the box labeled Build App Bundle (Google Play).

Once that’s done, you’re ready to make your AAB build.

Unity Create AAB Build: Step-by-Step

When you’re ready to create an AAB file, follow these steps to avoid common pitfalls and errors.

Step 1: Configure Android Build Settings

  1. Go to File > Build Settings.

  2. Choose Android and click Switch Platform (if not already selected).

  3. Make sure Build App Bundle (Google Play) is checked.

  4. Set the Build System to Gradle.

  5. Click on Player Settings to configure:

    • Company Name and Product Name

    • Package Name (e.g., com.yourcompany.yourgame)

    • Version and Bundle Version Code

    • Minimum API Level (set this to at least 21, which is required for Play Store)

Step 2: Set Up Your Keystore

Google Play requires a signed build. In Unity:

  • Navigate to Player Settings > Publishing Settings

  • Use a custom keystore or generate a new one within Unity

  • Fill in keystore password, alias, and key password

This step is crucial—without it, your AAB build won’t be accepted by the Play Store.

Step 3: Build the AAB

Once everything is set:

  • Go back to Build Settings

  • Click Build

  • Choose your save location

  • Unity will now generate an .aab file instead of an .apk

That’s it! You’ve successfully created an AAB build in Unity. Now you’re ready to upload it to Google Play Console.

AAB Format Unity: Key Benefits

Switching to the AAB format in Unity has multiple advantages:

  • Smaller download sizes: Only necessary code and resources are downloaded for each device

  • Dynamic delivery: Deliver features and assets when needed

  • Play Feature Delivery: Optional modules can be downloaded after install

  • Future-proof: All new Google Play apps must use this format

It’s not just about compliance—this format can actually enhance your game’s performance and user experience.

Common Errors and Why Unity Build Not Working

If you’re encountering issues and wondering why Unity build not working, you’re not alone. Here are some common problems and their fixes:

1. Gradle Build Fails

Error: Gradle build failed. See the Console for details.
Solution:

  • Make sure you have Android Build Support module installed

  • Open Unity Hub > Installs > Add Modules

  • Also, ensure you’ve installed OpenJDK, SDK & NDK

2. Keystore Not Configured

Error: You need to create a keystore to sign your app bundle.
Solution:

  • Go to Player Settings > Publishing Settings

  • Either use an existing keystore or create a new one in Unity

3. Wrong API Level

Error: Google Play Console rejects the build
Solution:

  • Minimum API level must be 21 or higher

  • Check under Player Settings > Other Settings

4. Missing Internet Permissions

Issue: Your game doesn’t connect online
Solution:

  • Add INTERNET and ACCESS_NETWORK_STATE permissions in the AndroidManifest.xml

5. Build Option Not Available

Problem: The “Build App Bundle” checkbox is greyed out
Solution:

  • Set your Build System to Gradle

  • Ensure platform is switched to Android

Troubleshooting build issues is a common part of mobile development. The “why Unity build not working” question often comes down to small misconfigurations.

Uploading the AAB to Google Play

Now that your AAB is ready, here’s how to upload it:

  1. Go to the Google Play Console

  2. Select your app or create a new one

  3. Go to Release > Production > Create New Release

  4. Upload your .aab file

  5. Complete the release notes and click Review Release

  6. Finally, click Start Rollout to Production

Google will now process your AAB and generate optimized APKs for different devices.

Testing Your AAB Build

Before publishing your game globally, you’ll want to test your build thoroughly.

Internal Testing:

  • Use the Google Play Console > Testing > Internal Testing

  • Add testers via email

  • Upload your AAB and let testers download it directly from the Play Store

Firebase Test Lab:

  • Upload your AAB to Firebase for automated testing across real devices

Testing ensures that your game runs smoothly on a wide variety of Android phones and tablets.

Unity AAB Build Best Practices

Here are some expert tips when working with AAB builds in Unity:

  • Keep Unity Updated: Always use the latest stable version of Unity to avoid compatibility issues

  • Optimize Build Size: Use Unity’s Addressables System and asset stripping

  • Use Custom Proguard Rules: Helps reduce size and obfuscate code

  • Check for Duplicate Resources: Unity sometimes duplicates assets across different folders

  • Monitor Crashes: Use Firebase Crashlytics or Google Play Console for post-launch diagnostics

Conclusion

Creating an AAB build in Unity may seem daunting at first, but it’s a straightforward process once you understand the requirements and setup. By following the right steps—configuring Gradle, setting up your keystore, and properly selecting build options—you’ll ensure your game is ready for publishing on the Google Play Store.

Remember to test thoroughly, troubleshoot common issues, and optimize for performance. Whether you’re just starting with Android development or publishing your tenth game, adopting the aab format in Unity will help future-proof your workflow and meet Google’s publishing standards.

While AAB builds are required for publishing on the Google Play Store, you might also need to create a standalone version of your game for Windows or testing purposes. If that’s the case, this guide on How To Export Unity Project As Exe will show you how to build your Unity project into a Windows executable (.exe) file quickly and easily.

Leave a Reply