|
@@ -3,23 +3,33 @@
|
|
|
Exporting for Android
|
|
|
=====================
|
|
|
|
|
|
-.. seealso::
|
|
|
-
|
|
|
- If you are using Godot 3.2.4 beta/RC, note that
|
|
|
- **the Android export process has changed**. Read an
|
|
|
- `updated version of this page <https://github.com/m4gr3d/godot-docs/blob/02cfb669f6b4ee77f0cb3e13b4d41054cc020673/getting_started/workflow/export/exporting_for_android.rst>`__
|
|
|
- instead of the page you're currently on.
|
|
|
-
|
|
|
-Exporting for Android has fewer requirements than compiling Godot for it.
|
|
|
-The following steps detail what is needed to setup the SDK and the engine.
|
|
|
+Exporting for Android has fewer requirements than compiling Godot for Android.
|
|
|
+The following steps detail what is needed to set up the Android SDK and the engine.
|
|
|
|
|
|
Download the Android SDK
|
|
|
------------------------
|
|
|
|
|
|
-Download and install the Android SDK from
|
|
|
-`developer.android.com <https://developer.android.com/studio/>`__.
|
|
|
+Download and install the Android SDK.
|
|
|
+
|
|
|
+- You can install it using `Android Studio version 4.1 or later <https://developer.android.com/studio/>`__.
|
|
|
+
|
|
|
+ - Run it once to complete the SDK setup using these `instructions <https://developer.android.com/studio/intro/update#sdk-manager>`__.
|
|
|
+ - Ensure that the `required packages <https://developer.android.com/studio/intro/update#recommended>`__ are installed as well.
|
|
|
+
|
|
|
+ - Android SDK Platform-Tools version 30.0.5 or later
|
|
|
+ - Android SDK Build-Tools version 30.0.1
|
|
|
+ - Android SDK Platform 29
|
|
|
+ - Android SDK Command-line Tools (latest)
|
|
|
+ - CMake version 3.10.2.4988404
|
|
|
+ - NDK version 21.4.7075529
|
|
|
+
|
|
|
+- You can install it using the `command line tools <https://developer.android.com/studio/#command-tools>`__.
|
|
|
|
|
|
-If you install Android Studio, you need to run it once to complete the SDK setup.
|
|
|
+ - Once the command line tools are installed, run the `sdkmanager <https://developer.android.com/studio/command-line/sdkmanager>`__ command to complete the setup process:
|
|
|
+
|
|
|
+::
|
|
|
+
|
|
|
+ sdkmanager --sdk_root=<android_sdk_path> "platform-tools" "build-tools;30.0.1" "platforms;android-29" "cmdline-tools;latest" "cmake;3.10.2.4988404" "ndk;21.4.7075529"
|
|
|
|
|
|
.. note::
|
|
|
|
|
@@ -29,16 +39,15 @@ If you install Android Studio, you need to run it once to complete the SDK setup
|
|
|
Install OpenJDK 8
|
|
|
-----------------
|
|
|
|
|
|
-Download and install `OpenJDK 8 <https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=hotspot>`__,
|
|
|
-newer versions do not work.
|
|
|
+Download and install `OpenJDK 8 <https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=hotspot>`__.
|
|
|
|
|
|
Create a debug.keystore
|
|
|
-----------------------
|
|
|
|
|
|
Android needs a debug keystore file to install to devices and distribute
|
|
|
non-release APKs. If you have used the SDK before and have built
|
|
|
-projects, ant or eclipse probably generated one for you (on Linux and
|
|
|
-macOS, you can find it in the ``~/.android`` directory).
|
|
|
+projects, ant or eclipse probably generated one for you (in the ``~/.android`` directory on Linux and
|
|
|
+macOS, in the ``C:\Users\<user>\.android\`` directory on Windows).
|
|
|
|
|
|
If you can't find it or need to generate one, the keytool command from
|
|
|
the JDK can be used for this purpose::
|
|
@@ -47,13 +56,6 @@ the JDK can be used for this purpose::
|
|
|
|
|
|
This will create a ``debug.keystore`` file in your current directory. You should move it to a memorable location such as ``%USERPROFILE%\.android\``, because you will need its location in a later step. For more information on ``keytool`` usage, see `this Q&A article <https://godotengine.org/qa/21349/jdk-android-file-missing>`__.
|
|
|
|
|
|
-Make sure you have adb
|
|
|
-----------------------
|
|
|
-
|
|
|
-Android Debug Bridge (``adb``) is the command line tool used to communicate with
|
|
|
-Android devices. It's installed with the SDK, but you may need to install one
|
|
|
-(any) of the Android API levels for it to be installed in the SDK directory.
|
|
|
-
|
|
|
Setting it up in Godot
|
|
|
----------------------
|
|
|
|
|
@@ -67,13 +69,10 @@ Scroll down to the section where the Android settings are located:
|
|
|
|
|
|
.. image:: img/androidsdk.png
|
|
|
|
|
|
-In that screen, the path to 3 files needs to be set:
|
|
|
-
|
|
|
-- The ``adb`` executable (``adb.exe`` on Windows)
|
|
|
- - It can usually be found at ``%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe``.
|
|
|
+In that screen, 2 paths need to be set:
|
|
|
|
|
|
-- The ``jarsigner`` executable (from JDK 6 or 8)
|
|
|
- - On Windows, OpenJDK installs to a directory like ``%PROGRAMFILES%\AdoptOpenJDK\jdk-8.0.252.09-hotspot\bin``. On Linux, it typically installs to a directory like ``/usr/bin/jarsigner``. The exact path may vary depending on the OpenJDK update you've installed and your machine's operating system.
|
|
|
+- The ``Android Sdk Path`` should be the location where the Android SDK was installed.
|
|
|
+ - For example ``%LOCALAPPDATA%\Android\Sdk\`` on Windows or ``/Users/$USER/Library/Android/sdk/`` on macOS.
|
|
|
|
|
|
- The debug ``.keystore`` file
|
|
|
- It can be found in the folder where you put the ``debug.keystore`` file you created above.
|
|
@@ -100,7 +99,8 @@ If you don't provide some of the requested icons, Godot will replace them using
|
|
|
- **Adaptive Icon Foreground:** Provided foreground icon -> Provided main icon -> Project icon -> Default Godot foreground icon.
|
|
|
- **Adaptive Icon Background:** Provided background icon -> Default Godot background icon.
|
|
|
|
|
|
-It's highly recommended to provide all requested icons, and at least with the specified resolutions. Only this way your application will look great on all Android devices and versions.
|
|
|
+It's highly recommended to provide all the requested icons with their specified resolutions.
|
|
|
+This way, your application will look great on all Android devices and versions.
|
|
|
|
|
|
Exporting for Google Play Store
|
|
|
-------------------------------
|