Skip to main content

Overview

Godot supports exporting to Android devices and publishing to Google Play Store. The export process requires Android SDK and Java JDK for building APK or AAB packages.

Prerequisites

Install Android SDK

1

Download Android Studio

Install Android Studio from https://developer.android.com/studio
2

Install SDK tools

Use SDK Manager to install:
  • Android SDK Platform Tools
  • Android SDK Build Tools
  • Android SDK Platform (API 33 or higher recommended)
3

Configure Godot

Go to Editor > Editor Settings > Export > Android Set paths:
  • Android SDK Path: Path to Android SDK
  • Debug Keystore: Path to debug keystore

Install Java JDK

# Linux
sudo apt install openjdk-17-jdk

# macOS (using Homebrew)
brew install openjdk@17

# Windows
# Download from https://adoptium.net/
Godot requires Java JDK 11 or newer. JDK 17 is recommended for best compatibility.

Creating Android export preset

  1. Go to Project > Export
  2. Click Add… and select Android
  3. Configure preset settings

Basic settings

# Essential Android export settings
# These are configured in the export preset

# Package name (reverse domain notation)
# Example: com.yourcompany.yourgame
Package Name: "com.example.mygame"

# Version code (increment for each release)
Version Code: 1

# Version name (displayed to users)
Version Name: "1.0.0"

# Minimum SDK version
Min SDK: 21  # Android 5.0 Lollipop

# Target SDK version
Target SDK: 33  # Android 13

Export formats

APK (Android Package)

Standard Android package format:
# Export APK
godot --headless --export-release "Android" "builds/game.apk"
APK is suitable for direct installation and testing. Use AAB for Google Play Store releases.

AAB (Android App Bundle)

Google Play’s publishing format:
  1. In export preset, enable Use App Bundle (AAB)
  2. Export the project
  3. Upload AAB to Google Play Console
# Export AAB
godot --headless --export-release "Android" "builds/game.aab"
AAB allows Google Play to generate optimized APKs for different device configurations, reducing download size.

App signing

Debug keystore

Automatically generated for development:
# Default debug keystore location
# Linux/macOS: ~/.android/debug.keystore
# Windows: %USERPROFILE%\.android\debug.keystore

Release keystore

Create a keystore for production releases:
# Generate release keystore
keytool -genkey -v -keystore release.keystore -alias mygame \
  -keyalg RSA -keysize 2048 -validity 10000

# Enter password and information when prompted
Configure in export preset:
# Release signing configuration
Keystore:
  Release: "path/to/release.keystore"
  Release User: "mygame"
  Release Password: "your_keystore_password"
Keep your release keystore and password secure and backed up. Losing it means you cannot update your app on Google Play.

Permissions

Android requires declaring permissions in the manifest:

Common permissions

# Configure in export preset under "Permissions"

# Network access
ACCESS_NETWORK_STATE: true
INTERNET: true

# Storage
READ_EXTERNAL_STORAGE: true
WRITE_EXTERNAL_STORAGE: true

# Location
ACCESS_FINE_LOCATION: false
ACCESS_COARSE_LOCATION: false

# Vibration
VIBRATE: true

# Camera/Microphone
CAMERA: false
RECORD_AUDIO: false

Runtime permissions

Android 6.0+ requires runtime permission requests:
func request_permission(permission: String):
    if OS.get_name() == "Android":
        var permission_name = "android.permission." + permission
        if not OS.has_permission(permission_name):
            OS.request_permission(permission_name)

func check_permission(permission: String) -> bool:
    if OS.get_name() == "Android":
        var permission_name = "android.permission." + permission
        return OS.has_permission(permission_name)
    return true

# Usage
func _ready():
    if not check_permission("CAMERA"):
        request_permission("CAMERA")

Android plugins

Extend functionality with Android plugins:

Installing plugins

  1. Download .gdap or .aar plugin files
  2. Place in res://android/plugins/
  3. Enable in export preset under Plugins

Custom Android plugin

// MyPlugin.kt
package com.example.mygame

import org.godotengine.godot.Godot
import org.godotengine.godot.plugin.GodotPlugin

class MyPlugin(godot: Godot) : GodotPlugin(godot) {
    
    override fun getPluginName() = "MyPlugin"
    
    @UsedByGodot
    fun showToast(message: String) {
        runOnUiThread {
            Toast.makeText(activity, message, Toast.LENGTH_SHORT).show()
        }
    }
}
Use in GDScript:
var my_plugin

func _ready():
    if Engine.has_singleton("MyPlugin"):
        my_plugin = Engine.get_singleton("MyPlugin")
        my_plugin.showToast("Hello from Android!")

Screen orientation

Configure screen orientation:
# In export preset
Screen Orientation: 1  # 0=Landscape, 1=Portrait, 2=Sensor

# Or change at runtime
DisplayServer.window_set_orientation(DisplayServer.SCREEN_LANDSCAPE)

Android features

Expansion files (OBB)

For games larger than 100MB:
  1. Enable Use Expansion (OBB) in export preset
  2. Main APK/AAB will be small
  3. Large assets go in expansion file
  4. Google Play handles expansion file delivery

App icon

# Set in export preset
Launcher Icons:
  Main 192x192: "res://icon_192.png"
  Adaptive Foreground 432x432: "res://adaptive_foreground.png"
  Adaptive Background 432x432: "res://adaptive_background.png"

Splash screen

# Configure splash screen
Splash Screen:
  Show Image: true
  Image: "res://splash.png"
  Bg Color: Color(0, 0, 0, 1)

Google Play services

Integrate Google Play services:
# Enable in export preset
Google Play Services:
  Enable: true
  
# Example: Google Play Games Services
func sign_in_google_play():
    if Engine.has_singleton("GooglePlayGameServices"):
        var gpgs = Engine.get_singleton("GooglePlayGameServices")
        gpgs.sign_in()

Publishing to Google Play

Preparing for release

1

Build release AAB

Export signed AAB with release keystore
2

Test thoroughly

Test on multiple devices and Android versions
3

Prepare store listing

  • App title and description
  • Screenshots (phone, tablet, TV)
  • Feature graphic (1024x500)
  • App icon (512x512)
4

Set up Google Play Console

Create developer account ($25 one-time fee)

Upload to Play Console

  1. Go to Google Play Console
  2. Create new app
  3. Upload AAB to Production, Beta, or Internal testing
  4. Complete store listing
  5. Submit for review

Update versioning

# Increment for each update
Version Code: 2  # Must be higher than previous
Version Name: "1.0.1"  # Displayed to users

Testing on device

USB debugging

1

Enable developer options

On device: Settings > About Phone > Tap Build Number 7 times
2

Enable USB debugging

Settings > Developer Options > USB Debugging
3

Connect device

Connect via USB and authorize computer
4

One-click deploy

In Godot, enable Runnable in Android export preset and click deploy button

Wireless debugging

# Enable wireless debugging
adb tcpip 5555
adb connect DEVICE_IP:5555

# Deploy to device
adb install -r game.apk

Performance optimization

Use Mobile renderer

Select Mobile renderer in Project Settings for better performance on Android.

Optimize textures

Use ETC2/ASTC compression for Android textures.

Reduce draw calls

Batch meshes and minimize material changes.

Test on low-end devices

Ensure your game runs well on older Android devices.

Common issues

Build errors

Verify Android SDK path in Editor Settings. Ensure SDK tools are installed.
Install the required Build Tools version from SDK Manager.
Ensure Java JDK 11 or newer is installed and in PATH.
Clear Gradle cache and rebuild: ./gradlew clean build

Runtime issues

# Check if running on Android
if OS.get_name() == "Android":
    # Android-specific code
    print("Android version: ", OS.get_version())
    print("Device model: ", OS.get_model_name())

Android-specific code

func _ready():
    if OS.get_name() == "Android":
        # Prevent screen from sleeping
        OS.screen_keep_on = true
        
        # Get safe area (for notches)
        var safe_area = DisplayServer.get_display_safe_area()
        
        # Handle back button
        get_tree().set_quit_on_go_back(false)

func _notification(what):
    if what == NOTIFICATION_WM_GO_BACK_REQUEST:
        # Handle Android back button
        show_quit_dialog()

Next steps

iOS

Export for iOS devices

Web

Export for web browsers

Desktop

Export for desktop platforms

Build docs developers (and LLMs) love