Game development

Export a Godot 4 game to Android: APK and AAB

By Jérôme Stéphan · November 15, 2026 · Reading time: 7 min

Read in: Español · English · Français

Export a Godot 4 game to Android: APK and AAB

Exporting a Godot game to Android isn't hard, but things have to be done in order, and Google Play's requirements change every year. This guide follows the path I use for my own games in Godot 4.7.2 (November 2026): an APK to test on a phone, then a signed AAB for Google Play. It complements my general guide to making an Android game with Godot.

Chrono Trotter on an Android phone: fighting the Hydra
The result: Chrono Trotter, exported from Godot 4.7, on an Android phone.

1. What to install

The official documentation gives this command to install everything in one go:

sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;35.0.1" "platforms;android-35" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;28.1.13356709"
Watch the versions. The 4.7 documentation still lists the SDK 35 series, but Godot 4.7.2's build template compiles against API 36. My PC has Build-Tools 36.1.0 and the Android 36 platform installed, with no NDK or CMake, and that's what I export my games with.

2. Tell Godot where everything is

Under Editor > Editor Settings > Export > Android there are two paths to fill in:

Since Godot 4.3 you no longer create the debug keystore by hand: the editor generates it once it knows the Java path.

3. An APK to test on your phone

In Project > Export, add an "Android" preset. By default it exports an APK for the arm64-v8a architecture only, the one in nearly every current phone. The one thing to change is the unique package name, in reverse-domain format: lowercase letters, digits, underscores and periods only, and each part must start with a letter.

Choose that name carefully. On Google Play it's permanent: it can't be changed or reused, and a package with another name counts as a different app.

To test, turn on developer mode and USB debugging on the phone and plug it in: an Android icon appears at the top right of the editor, which exports, installs and runs the game in one click. If the phone doesn't show up, first check that adb devices can see it.

4. A signed AAB for Google Play

Google Play only accepts the AAB format for new apps, and Godot only produces it with a Gradle build. In my projects I use a second export preset, "Google Play", separate from the test one.

  1. Install the build template. Project menu > "Install Android Build Template". It creates an Android project in res://android/build, which you don't need to touch.
  2. Turn on "Use Gradle Build" in the preset and choose the AAB format.
  3. Create a signing key with the command from the documentation:
keytool -v -genkey -keystore mygame.keystore -alias mygame -keyalg RSA -validity 10000
  1. Fill in the three fields of the preset: Release (the file path), Release User (the alias) and Release Password. The key and the keystore must share the same password, and it's best to use letters and digits only.
  2. Untick "Export With Debug" when exporting.
  3. Raise the version code (version/code) on every upload: Google Play rejects a number that's already been used.
Keep that key somewhere safe. It's your upload key: with Play App Signing, Google signs the files users receive with its own key, and can reset yours if you lose it. Even so, losing it means paperwork and days of waiting.

The first Gradle build takes several minutes because it downloads its dependencies. Later ones are much faster.

5. What Google Play requires in 2026

6. Exporting from the command line

Once the presets work in the editor, you no longer need to open it. I keep two .bat files per game, with these commands:

godot --headless --path . --export-debug "Android" build/game.apk
adb install -r build/game.apk

godot --headless --path . --export-release "Google Play" build/game.aab

The first builds the test APK and installs it on the connected phone. The second builds the AAB I upload to the Play Console. If your system drive is full, the GRADLE_USER_HOME environment variable lets you move Gradle's cache to another drive.

7. The most common errors

MessageFix
Android build template not installed in the projectProject > Install Android Build Template.
Android build version mismatchAfter updating Godot, reinstall the template from the same menu.
A valid Java SDK path is required in Editor SettingsPoint the editor settings to the OpenJDK 17 folder.
Missing 'build-tools' directory!Install the SDK Build-Tools and check the SDK path.
"Export AAB" is only valid when "Use Gradle Build" is enabledTurn on the Gradle build in the preset.
Release keystore incorrectly configured in the export presetFill in all three key fields, or none.
ETC2/ASTC texture compression is requiredProject Settings > Rendering > Textures: enable "Import ETC2 ASTC".
Could not install to deviceUninstall from the phone the app with the same package name signed with a different key.

And then?

With the AAB in hand, two steps remain, which I cover separately: preparing the Google Play listing (images, text and forms) and, with a recent personal account, the closed test with 12 testers for 14 days. It's the path Chrono Trotter is following. For your own projects, see my custom software service.

Got a game or app project?

Let's talk: I'll propose the architecture, the timeline and a clear price.

Get my free quoteMessage me on WhatsApp
WhatsApp