Language:
Page Info
Tags:
Skill Level:
Engine Version:
Contributors:
yaakuro

1 - Required Setup

Choose your OS:

Unreal Engine 4 uses a special version of the Android Software Development Kit (SDK), called CodeWorks for Android. CodeWorks for Android is the easiest way to set up the SDK and Native Development Kit (NDK) needed to develop Android projects with Unreal Engine 4. If you have older versions (prior to version 1R5) of the Android SDK installed (or, older versions of CodeWorks for Android), we recommend that you uninstall them and install CodeWorks for Android , using the CodeWorks for Android installer that is distributed with Unreal Engine 4.

We've bundled the CodeWorks for Android installer with Unreal Engine 4 to make sure that your Android SDK will be compatible with the Engine. It's important to note that, as of Unreal Engine version 4.16, the Engine includes CodeWorks for Android 1R6u1.

Installing CodeWorks for Android

For the purpose of showing you how to get started with Android on Linux, we will use CodeWorks for Android 1R6u1 while working with Unreal Engine version 4.14. The Engine should be closed before installing CodeWorks for Android 1R6u1. Also, please make sure that you have Java Development Kit 8 (JDK 8) installed, with your JAVA_HOME environment variable set to the correct version of the Java Development Kit (JDK). To verify that JAVA_HOME is set properly, enter echo $JAVA_HOME into the terminal. If you don't see the correct JDK version, download JDK 8 , and install it on your Linux computer, making sure to set the JAVA_HOME environment variable to the newly installed JDK.

Before continuing, please note that Android Vulkan on Linux is not supported at this time.

  1. Getting started, open the Terminal and navigate to the [UE4Root] folder that contains the compiled engine (using the cd command, changing the shell working directory).

    LinuxAndroid_Step0.png

  2. From inside of the [UE4Root] folder, navigate to the CodeWorks for Android 1R6u1 binary file (CodeWorksforAndroid-1R6u1-linux-x64.run) by entering the following string into the terminal: cd Engine/Extras/AndroidWorks/Linux.

    LinuxAndroid_Step1.png

  3. Now, enter ls -l into the terminal, displaying a long listing of the directory's contents.

    LinuxAndroid_Step2.png

    The file's permission settings tell you that CodeWorksforAndroid-1R6u1-linux-x64.run is not ready for execution. Before you can run the CodeWorks for Android 1R6u1 binary, you need to change the file's access rights to allow for "execute" permissions.

  4. To change the file permission settings of CodeWorksforAndroid-1R6u1-linux-x64.run, enabling it to run like a normal executable, enter chmod +x CodeWorksforAndroid-1R6u1-linux-x64.run into the terimal.

    LinuxAndroid_Step3.png

    If you want to learn more about the chmod command, enter man chmod into the terminal to read the manual page covering how chmod works.

  5. Now, enter ls -l into the terminal.

    LinuxAndroid_Step4.png

    The file's permission settings highlighted in the image indicate that the CodeWorks for Android 1R6u1 binary file is ready for execution.

  6. To run the CodeWorks for Android binary, enter ./CodeWorksforAndroid-1R6u1-linux-x64.run into the terminal.

    LinuxAndroid_Step5.png

    Please make sure that your computer has a valid Internet connection prior to moving onto the next step.

  7. After the CodeWorks for Android 1R6u1 binary unpacks the NVIDIA CodeWorks for Android installer, you'll see the Installer Welcome window, prompting you to click either Next or Cancel.

    LinuxAndroid_Step6.png

  8. From the Installer Welcome window, click the Next button to begin the installation process.

    LinuxAndroid_Step7.png

  9. Now, from the Android Developer's Welcome Window, click the Next button to continue the installation process.

    LinuxAndroid_Step8.png

  10. Specify the directory where CodeWorks for Android 1R6u1 should be installed and downloaded.

    LinuxAndroid_Step9.png

  11. Click the Next > button to download CodeWorks for Android 1R6u1 from NVIDIA, ultimately installing CodeWorks on your computer.

    LinuxAndroid_Step10.png

  12. Now, verify that you're installing CodeWorks for Android 1R6u1 before clicking the Next button from the Android Component Manager window.

    LinuxAndroid_Step11.png

  13. After the Terms and Conditions window appears, take some time to read through all of the Terms and Conditions before selecting the Accept All check box.

    LinuxAndroid_Step12.png

  14. Now, click the Accept button to begin the installation process.

    LinuxAndroid_Step13.png

  15. Once the installer completes the installation process, go ahead and click the Next > button to proceed.

    LinuxAndroid_Step14.png

  16. After the Installation Complete window opens, click the Finish button to complete the installation.

    LinuxAndroid_Step15.png

  17. Make sure to reboot your computer before moving onto the next step.

    LinuxAndroid_Note16.png

    If you don't want to use Ubuntu's GUI, you can restart your computer by entering sudo reboot into the terminal.

End Result

At this point in the tutorial, you've installed the Android SDK, which is the first step in preparation for mobile game development with Unreal Engine 4 on Linux. The next step shows you how to set up the development environment on your Android device.

Tags