Skip to content

Update the Android build documentation #10886

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
May 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 13 additions & 9 deletions contributing/development/compiling/compiling_for_android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,21 +104,21 @@ root directory with the following arguments:
::

scons platform=android target=template_release arch=arm32
scons platform=android target=template_release arch=arm64 generate_apk=yes
scons platform=android target=template_release arch=arm64 generate_android_binaries=yes

- Debug template (used when exporting with **Debugging Enabled** checked)

::

scons platform=android target=template_debug arch=arm32
scons platform=android target=template_debug arch=arm64 generate_apk=yes
scons platform=android target=template_debug arch=arm64 generate_android_binaries=yes

- (**Optional**) Dev template (used when troubleshooting)

::

scons platform=android target=template_debug arch=arm32 dev_build=yes
scons platform=android target=template_debug arch=arm64 dev_build=yes generate_apk=yes
scons platform=android target=template_debug arch=arm64 dev_build=yes generate_android_binaries=yes

The resulting templates will be located under the ``bin`` directory:

Expand All @@ -129,9 +129,11 @@ The resulting templates will be located under the ``bin`` directory:

.. note::

- If you are changing the list of architectures you're building, remember to add ``generate_apk=yes`` to the *last* architecture you're building, so that the template files are generated after the build.
- If you are changing the list of architectures you're building, remember to add ``generate_android_binaries=yes`` to the *last* architecture you're building, so that the template files are generated after the build.

- To include debug symbols in the generated templates, add the ``debug_symbols=yes`` parameter to the SCons command.
- To include debug symbols in the generated templates, add the ``debug_symbols=yes`` parameters to the SCons command.

- Note that you can include ``separate_debug_symbols=yes`` to generate the debug symbols in a separate ``*-native-debug-symbols.zip`` file.

.. seealso::

Expand All @@ -151,7 +153,7 @@ example, for the release template:
scons platform=android target=template_release arch=arm32
scons platform=android target=template_release arch=arm64
scons platform=android target=template_release arch=x86_32
scons platform=android target=template_release arch=x86_64 generate_apk=yes
scons platform=android target=template_release arch=x86_64 generate_android_binaries=yes

This will create template binaries that works on all platforms.
The final binary size of exported projects will depend on the platforms you choose
Expand Down Expand Up @@ -222,15 +224,17 @@ root directory with the following arguments:
scons platform=android arch=arm32 production=yes target=editor
scons platform=android arch=arm64 production=yes target=editor
scons platform=android arch=x86_32 production=yes target=editor
scons platform=android arch=x86_64 production=yes target=editor generate_apk=yes
scons platform=android arch=x86_64 production=yes target=editor generate_android_binaries=yes

- You can add the ``dev_build=yes`` parameter to generate a dev build of the Godot editor.

- You can add the ``debug_symbols=yes`` parameter to include the debug symbols in the generated build.
- You can add the ``debug_symbols=yes`` parameters to include the debug symbols in the generated build.

- Note that you can include ``separate_debug_symbols=yes`` to generate the debug symbols in a separate ``*-native-debug-symbols.zip`` file.

- You can skip certain architectures depending on your target device to speed up compilation.

Remember to add ``generate_apk=yes`` to the *last* architecture you're building, so that binaries are generated after the build.
Remember to add ``generate_android_binaries=yes`` to the *last* architecture you're building, so that binaries are generated after the build.

The resulting binaries will be located under ``bin/android_editor_builds/``.

Expand Down
4 changes: 2 additions & 2 deletions tutorials/export/exporting_for_android.rst
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ Download and install the Android SDK.
- Ensure that the `NDK and CMake are installed and configured <https://developer.android.com/studio/projects/install-ndk>`__.

- CMake version 3.10.2.4988404
- NDK version r23c (23.2.8568313)
- NDK version r27c (27.2.12479018)

- Alternatively, you can install the Android SDK with the `sdkmanager` command line tool.

Expand All @@ -50,7 +50,7 @@ Download and install the Android SDK.

::

sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;34.0.0" "platforms;android-34" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;23.2.8568313"
sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;34.0.0" "platforms;android-34" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;27.2.12479018"

.. note::

Expand Down
Loading