Skip to content

Commit bf0ea4d

Browse files
authored
Merge pull request #11733 from m4gr3d/update_android_studio_instructions
Update the Android Studio instructions to match the new build types
2 parents 3426d59 + 2a2f732 commit bf0ea4d

6 files changed

Lines changed: 25 additions & 25 deletions

File tree

engine_details/development/compiling/compiling_for_android.rst

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ For compiling under Windows, Linux or macOS, the following is required:
3030
- `SCons 4.0+ <https://scons.org/pages/download.html>`_ build system.
3131
- Android SDK
3232

33-
- To install the Android SDK, follow the steps here <https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html>_.
33+
- To install the Android SDK, follow the steps `here <https://docs.godotengine.org/en/stable/tutorials/export/exporting_for_android.html>`_.
3434
- On Linux, **do not use an Android SDK provided by your distribution's repositories** as it will often be outdated.
3535
- On macOS, **do not use an Android SDK provided by Homebrew** as it will not be installed in a unified location.
3636

@@ -97,24 +97,18 @@ root directory with the following arguments:
9797
scons platform=android target=template_debug arch=arm32
9898
scons platform=android target=template_debug arch=arm64 generate_android_binaries=yes
9999

100-
- (**Optional**) Dev template (used when troubleshooting)
101-
102-
::
103-
104-
scons platform=android target=template_debug arch=arm32 dev_build=yes
105-
scons platform=android target=template_debug arch=arm64 dev_build=yes generate_android_binaries=yes
106-
107100
The resulting templates will be located under the ``bin`` directory:
108101

109102
- ``bin/android_release.apk`` for the release template
110103
- ``bin/android_debug.apk`` for the debug template
111-
- ``bin/android_dev.apk`` for the dev template
112104
- ``bin/android_source.zip`` for the Gradle build template
113105

114106
.. note::
115107

116108
- 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.
117109

110+
- To enable dev build (for use when troubleshooting) in the generated templates, add the ``dev_build=yes`` parameters to the SCons command.
111+
118112
- To include debug symbols in the generated templates, add the ``debug_symbols=yes`` parameters to the SCons command.
119113

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

engine_details/development/configuring_an_ide/android_studio.rst

Lines changed: 22 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,43 +28,46 @@ Android Studio project layout
2828

2929
The project is organized using `Android Studio's modules <https://developer.android.com/studio/projects#ApplicationModules>`_:
3030

31-
- ``lib`` module:
32-
- Located under ``<Godot root directory>/platform/android/java/lib``, this is a **library module** that organizes
33-
the Godot java and native code and make it available as a reusable dependency / artifact.
34-
- The artifact generated by this module is made available for other Android modules / projects to use as a dependency, via `MavenCentral <https://repo1.maven.org/maven2/org/godotengine/godot/>`_.
31+
- **lib** module:
3532

36-
- ``editor`` module:
37-
- Located under ``<Godot root directory>/platform/android/java/editor``, this is an **application module** that holds
38-
the source code for the Android port of the Godot Editor.
39-
- This module has a dependency on the ``lib`` module.
33+
- Located under ``<Godot root directory>/platform/android/java/lib``, this is a **library module** that organizes the Godot java and native code and make it available as a reusable `Android library <https://developer.android.com/studio/projects/android-library>`_.
34+
- The generated :ref:`Godot Android library <doc_android_library>` is made available for other Android modules / projects via `MavenCentral <https://central.sonatype.com/artifact/org.godotengine/godot>`_, along with `its documentation <https://javadoc.io/doc/org.godotengine/godot/latest/index.html>`_.
4035

41-
- ``app`` module:
42-
- Located under ``<Godot root directory>/platform/android/java/app``, this is an **application module** that holds
43-
the source code for the Android build templates.
44-
- This module has a dependency on the ``lib`` module.
36+
- **editor** module:
37+
38+
- Located under ``<Godot root directory>/platform/android/java/editor``, this is an **application module** that holds the source code for the `Android and XR ports <https://godotengine.org/download/android/>`_ of the Godot Editor.
39+
- This module has a dependency on the **lib** module.
40+
41+
- **app** module:
42+
43+
- Located under ``<Godot root directory>/platform/android/java/app``, this is an **application module** that holds the source code for the Android build templates.
44+
- This module has a dependency on the **lib** module.
4545

4646
Building & debugging the editor module
4747
--------------------------------------
4848

4949
- To build the ``editor`` module:
50+
5051
- Select the `Run/Debug Configurations drop down <https://developer.android.com/studio/run/rundebugconfig#running>`_ and select ``editor``.
5152

5253
.. figure:: img/android_studio_editor_configurations_drop_down.webp
5354
:figclass: figure-w480
5455
:align: center
5556

5657
- Select **Run > Run 'editor'** from the top menu or `click the Run icon <https://developer.android.com/studio/run/rundebugconfig#running>`_.
58+
5759
- To debug the ``editor`` module:
60+
5861
- Open the **Build Variants** window using **View > Tools Windows > Build Variants** from the top menu.
59-
- In the **Build Variants** window, make sure that in the **Active Build Variant** column, the ``:editor`` entry is set to one of the **Dev** variants.
62+
- In the **Build Variants** window, make sure that in the **Active Build Variant** column, the ``:editor`` entry is set to one of the **Debug** variants.
6063

6164
.. figure:: img/android_studio_editor_build_variant.webp
6265
:figclass: figure-w480
6366
:align: center
6467

6568
- Open the **Run/Debug Configurations** window by clicking on **Run > Edit Configurations...** on the top menu.
6669
- In the **Run/Debug Configurations** window, select the ``editor`` entry, and under **Debugger** make sure the **Debug Type** is set to ``Dual (Java + Native)``
67-
- Click the ``+`` sign under the **Symbol Directories** section, and add the ``lib`` module directory: ``platform/android/java/lib``
70+
- Click the ``+`` sign under the **Symbol Directories** section, and add the ``platform/android/java/lib/libs/tools/debug`` directory.
6871

6972
.. figure:: img/android_studio_editor_debug_type_setup.webp
7073
:figclass: figure-w480
@@ -81,24 +84,27 @@ While developing in Android Studio, it's necessary to manually add a Godot proje
8184
Once that's done, you can follow the instructions below to run/debug the ``app`` module:
8285

8386
- To build the ``app`` module:
87+
8488
- Select the `Run/Debug Configurations drop down <https://developer.android.com/studio/run/rundebugconfig#running>`_ and select ``app``.
8589

8690
.. figure:: img/android_studio_app_configurations_drop_down.webp
8791
:figclass: figure-w480
8892
:align: center
8993

9094
- Select **Run > Run 'app'** from the top menu or `click the Run icon <https://developer.android.com/studio/run/rundebugconfig#running>`_.
95+
9196
- To debug the ``app`` module:
97+
9298
- Open the **Build Variants** window using **View > Tools Windows > Build Variants** from the top menu.
93-
- In the **Build Variants** window, make sure that in the **Active Build Variant** column, the ``:app`` entry is set to one of the **Dev** variants.
99+
- In the **Build Variants** window, make sure that in the **Active Build Variant** column, the ``:app`` entry is set to one of the **Debug** variants.
94100

95101
.. figure:: img/android_studio_app_build_variant.webp
96102
:figclass: figure-w480
97103
:align: center
98104

99105
- Open the **Run/Debug Configurations** window by clicking on **Run > Edit Configurations...** on the top menu.
100106
- In the **Run/Debug Configurations** window, select the ``app`` entry, and under **Debugger** make sure the **Debug Type** is set to ``Dual (Java + Native)``
101-
- Click the ``+`` sign under the **Symbol Directories** section, and add the ``lib`` module directory: ``platform/android/java/lib``
107+
- Click the ``+`` sign under the **Symbol Directories** section, and add the ``platform/android/java/lib/libs/debug`` directory.
102108

103109
.. figure:: img/android_studio_app_debug_type_setup.webp
104110
:figclass: figure-w480
6.35 KB
Loading
17.1 KB
Loading
5.37 KB
Loading
16.2 KB
Loading

0 commit comments

Comments
 (0)