Update instructions to setup Exporting for Android (#4520)

This commit is contained in:
Fredia Huya-Kouadio
2021-01-05 11:25:04 +01:00
committed by GitHub
parent 1b5a4f2a80
commit df1a214b84
2 changed files with 20 additions and 21 deletions
@@ -9,24 +9,33 @@ The following steps detail what is needed to setup the 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.
If you install Android Studio, you need to run it once to complete the SDK setup.
- You can install it using `Android Studio <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.
Install OpenJDK 8
- You can install it using the `command line tools <https://developer.android.com/studio/#command-tools>`__.
- 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"
Install OpenJDK
-----------------
Download and install `OpenJDK 8 <https://adoptopenjdk.net/index.html?variant=openjdk8&jvmVariant=hotspot>`__,
newer versions do not work.
Download and install `OpenJDK <https://adoptopenjdk.net/index.html>`__.
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::
@@ -35,13 +44,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
----------------------
@@ -55,13 +57,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:
In that screen, 2 paths need to be set:
- The ``adb`` executable (``adb.exe`` on Windows)
- It can usually be found at ``%LOCALAPPDATA%\Android\Sdk\platform-tools\adb.exe``.
- 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.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 80 KiB