Godot:Export:Android
lastmod 2023-04-05created 2020-11-0819 edits
Editor Settings
Godot-Editor-Settings.png
Export Android
Godot-Export-Android.png
Use Custom Build
If there are plugins, or if you need to add specific Java code, you need to do a custom build.
First, click Project > Install Android Build Template in the top menu:
Godot_-_install_android_build_template.png
Then click the "Install" button in the dialog that appears. It reads as follows:
|
|
Godot_-install_android_build_template-_confirm.png
When the installation is complete, an Android project (a template for building) is added at the res://android/build path. (It should be added to version control)
Add the required modules (plugins), and on "Android Export", click the "Use Custom Build" button.
Godot_-_android_export_with_use_custom_build.png
After that, go to Editor-> Editor Settings > Export > Android and set the Custom Build SDK Path.
Godot_-editor_settings-export-android-_custom_build_sdk_path.png
Troubleshooting
Unsupported class file major version 61
See Gradle#Unsupported class file major version 61.
Could not find keystore, unable to export
Go to Editor-> Editor Settings > Export > Android and check that all three pieces of keystore information—file path, user name, and password—are filled in correctly.
Godot_-editor_settings-_android_debug_keystore.png
'jarsigner' returned with error #1
Problems occur if the code signing information is wrong. Create the keystore file again with the keytool tool.
-
keytool -genkey -v -keystore debug.keystore -alias debug -keyalg RSA -keysize 2048 -validity 10000 - goto
Editor-> Editor Settings > Export > Android - Debug keystore field: Point to keystore file in JDK folder.
- replace field "Debug keystore user:" to name that keysore.
- replace field "Debug keystore password:" password when you generate keystore.
See also
- Godot
- Android
- Godot:Export:Android
- Godot:Export:iOS
- Android:Debugging:Wireless - How to do wireless debugging on Android
- gradle