Android Quick Start

Setting up for development for the Android platform.

Choose your operating system:

Windows

macOS

Linux

Android_QS_Editor_TopicImage.png

This Quick Start Guide will walk you through all of the essentials for setting up Unreal Engine 4 (UE4) for Android game development, including the following topics:

  • Setting up your test device and computer for Android game development.

  • Configuring new projects for mobile development.

  • Setting up Unreal Editor for packaging Android builds.

  • Setting the editor to preview with mobile rendering feature levels.

  • Testing your project on-device from the editor.

  • Packaging a standalone build of your project.

When you have completed this guide, you will be prepared to take an Android project from initial setup to testing and packaging.

1 - Android Development Prerequisites

In order to create and deploy an Android project, you will need to install several Android development prerequisites included with Unreal Engine and ensure that your device is ready for testing.

  1. Follow the guide in Setting Up Android SDK and NDK for Unreal to install Android Studio and set up the required SDK components for Android development in Unreal.

  2. On the device that you want to use for testing, open the Settings and enable Developer Mode .

  3. Locate Developer Options in your device's Settings, then enable USB Debugging .

    Click to enlarge image.

  4. Plug your device into your computer, then allow your computer to access your device's data.

  5. Permit your computer to install any needed drivers for your device.

Once you have completed these steps, you will be ready to develop new Android projects.

2 - Creating Your Project

In the following section we will be creating a new UE4 project that will use the Blueprint Third Person template to show how quickly you can get a UE4 project running on an Android device.

  1. Launch Unreal Editor . In the Unreal Project Browser , use the following settings to create a new project:

    • Project Category: Games

    • Template: Top Down

    • Target Hardware: Mobile/Tablet

    • Quality Level: Scalable 3D or 2D

  2. Name your project AndroidQuickStart and click the Create Project button to finish creating the project.

Choosing Mobile/Tablet for your target hardware and Scalable 3D or 2D for your target quality level will ensure that your project accounts for the user interface and hardware limitations of mobile devices.

3 - Setting Up Unreal Editor for Android

Next, we need to make sure our Project Settings in Unreal Editor are configured for Android APK builds.

  1. Click Edit > Project Settings to bring up the Project Settings window.

    Project Settings

  2. Inside of the Project Settings window, navigate to Platforms > Android .

  3. Under APK Packaging , there will be a warning that reads "Project is not configured for the Android platform". Click the Configure Now button to automatically set up your project to write the required platform files.

  4. Fill in the Android Package Name with an appropriate company and project name. In our instance we use com.EpicGames.AndroidQuickStart .

  5. If the Accept SDK License button is enabled, click it in order to accept Android's SDK license agreement. If you have previously accepted this agreement, then you will not need to complete this step.

    Configure Now

Your project will now be enabled to create Android builds and launch on an Android device.

4 - Configuring Editor and PIE for Mobile Previews

You can set Unreal Editor's Play-In-Editor (PIE) mode to provide a preview of how your game will look in the Mobile renderer.

  1. In the Toolbar , click Settings > Preview Rendering Level , then select one of the available rendering levels for Android.

    Click to enlarge image.

  2. Click the dropdown next to the Play button in the Toolbar . Choose one of the available Mobile Preview modes corresponding to the rendering level you selected.

    Mobile Preview PIE

The editor will now display your game in a way that is visually consistent with your target renderer. Additionally, when you press the PIE button, your game will launch in a standalone window set to a standard mobile aspect ratio and configured to emulate a touchscreen using your mouse. These settings will not affect packaging for mobile devices, but they will ensure that you have an accurate preview when working in the editor.

Refer to the Mobile Previewer reference for more information about how you can configure the Mobile Previewer.

5 - Launching on an Android Device

To test your current level on an Android-based device, you will need to do the following:

  1. First need to make sure you have the level you want to test open. From this example, we will be using the ThirdPersonExampleMap level from the Blueprint based project that was created in the last step.
    Correct_Level_Open.png

  2. With the ThirdPersonExampleMap now open go to the Main Toolbar and next to the Launch icon click on the small triangle that displays more options.
    Level_Deploy_Options.png

  3. From the Launch menu under the Devices section select your Android device from the list by clicking on it.
    launch_rightformat.png

  4. While your level is being launched on your device, the progress will be displayed in the bottom right-hand corner of the screen like in the following image.
    AndroidDevelopment_QS_4_PackingProgress.png

  5. When the deployment has finished, the project should automatically start running on your Android device. If the project fails to automatically start, you can start it by finding the App on your device and tapping on it to launch it.

    Click to enlarge image.

6 - Packaging Android Builds

The above steps provide a way to package and immediately launch a project on device. To package a standalone APK for distribution and testing, follow these steps:

  1. Click File > Package Project > Android > Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1) .

    Click to enlarge image.

  2. When the Package Project dialogue appears, choose the directory where you want to save it. Here we save it in AndroidQuickStart/Build .

    Click to enlarge image.

  3. Click Select Folder and Unreal Editor will begin packaging your project. Wait for it to finish packaging.

If you navigate to the folder where you output your build, the folder will contain the APK and OBB files necessary to install your game on an Android device. There are also a pair of .bat files that you can use to automatically install or uninstall your build to a connected device.

Click to enlarge image.

For more detailed information on configuring the Packaging settings for Android builds, refer to the Packaging Android Projects reference page.

7 - On Your Own

With what you have learned in this Quick Start you are now prepared to package and distribute your UE4 projects to general Android devices. You should expand on UE4's provided templates by creating new gameplay and levels in order to create fully functional mobile game. Depending on your project's needs and the devices that you are specificially targeting, further configuration will be required in order to optimize your builds. The following links will provide you with more information for taking the next steps in building your projects:

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss