Godot 3.3 Android Development Setup
Set up Godot 3.3 for making games on android.
Open the relevant documentation
- Godot Docs on exporting for Android
- Godot Docs on one-click deploy
- Godot Docs on supporting multiple resolutions
Configuring your android device for godot:
First enable developer mode on your phone.
Tap the build number 3-5 times Settings > System > About phone > build number
Then enable use debugging.
Settings > System > Advanced > Developer options > Debugging > USB debugging
Installing stuff
Install Android Development Studio
On linux, download and extract Android Development Studio. Open the install instructions file and follow its guidelines.
Run the bin/start.sh
file and click through the various menus.
Then open apk manager under configure > SDK Manager
.
Enable the latest android sdk version and the sdk for the version of android on your cellphone.
Now add the Sdk Path to Godots editor settings.
Editor Settings > Export > Android > Android Sdk Path
Installing Open Jdk.
Install open jdk on your system. In my case I just run:
1
sudo apt install openjdk-8-jdk
Configuring Godot
Create debug keys
Create a debug.keystore
file with:
1
keytool -keyalg RSA -genkeypair -alias androiddebugkey -keypass android -keystore debug.keystore -storepass android -dname "CN=Android Debug,O=Android,C=US" -validity 9999 -deststoretype pkcs12
Again in your editor settings,
Add the path to the debug.keystore
file to the Debug Keystore
field.
Then copy the -keypass
variable "android"
to the Debug Keystore Pass
field
and copy the -alias
variable "androiddebugkey"
to the Debug Keystore User
field
Configure Exports
Download and Install the default export template under
Editor > Manage Export Templates
.
In your Project > Export...
settings, add the Android preset.
My projects tend to use json files. So I need to add *.json
as a resource type to include in the export.
Make sure runnable is enabled and then click export.
One click install
Now plugin in your phone to your computer via usb. you should see a Android icon appear in the godot editor.
If it doesn’t show up, Check to see if you can transfer files to your phone. Occasionally my phone will fail to connect to my computer at all. Rebooting my cellphone normally resolves this.
If you can transfer files then make sure usb debugging
is enabled in the developer options.
Also make sure your android export has runnable enabled.
If its still not working then double check your editor configuration.
Once you have the android button available, press it to test your game on your phone.
Project Window Settings
Before you get to far into your project Its worth considering your display settings.
I like set my Stretch > Mode
to viewport
and Stretch > Aspect
to expand
.
You can read more about these setting in Godot’s Multiple Resolutions Docs
I am using a square 600x600 resolution because I want my design to expand to either screen orientation.
Making a icon
First read about providing launcher icons for godot also read about designing adaptive icons for Android
In the android export settings you will find 3 fields for launcher icons:
Main 192x192
Adaptive Foreground 432x432
Adaptive Background 432x432
More Resources
I highly recommend Ozzadar’s publish you game series on Youtube. He is covers publishing your game to the app store and various other things.
GDQuests 3.1 Android Development setup video on Youtube.
My example project on Github.