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
Install SDK tools
Use SDK Manager to install:
Android SDK Platform Tools
Android SDK Build Tools
Android SDK Platform (API 33 or higher recommended)
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
Go to Project > Export
Click Add… and select Android
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
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:
In export preset, enable Use App Bundle (AAB)
Export the project
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
Download .gdap or .aar plugin files
Place in res://android/plugins/
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:
Enable Use Expansion (OBB) in export preset
Main APK/AAB will be small
Large assets go in expansion file
Google Play handles expansion file delivery
App icon
# Set in export preset
Launcher Icons :
Main 192 x 192 : "res://icon_192.png"
Adaptive Foreground 432 x 432 : "res://adaptive_foreground.png"
Adaptive Background 432 x 432 : "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
Build release AAB
Export signed AAB with release keystore
Test thoroughly
Test on multiple devices and Android versions
Prepare store listing
App title and description
Screenshots (phone, tablet, TV)
Feature graphic (1024x500)
App icon (512x512)
Set up Google Play Console
Create developer account ($25 one-time fee)
Upload to Play Console
Go to Google Play Console
Create new app
Upload AAB to Production , Beta , or Internal testing
Complete store listing
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
Enable developer options
On device: Settings > About Phone > Tap Build Number 7 times
Enable USB debugging
Settings > Developer Options > USB Debugging
Connect device
Connect via USB and authorize computer
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
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