Unreal Cloud Docs
Guides

Unreal Engine Android setup, version by version

The Android Studio, NDK, SDK and JDK versions Unreal Engine 5.4 to 5.8 need, how to install them, and how to fix the common Android packaging errors.

Packaging for Android needs three things next to the engine: the Android SDK, the NDK and a Java JDK. Each engine version expects specific versions of them, and most Android packaging errors come from a mismatch. This page lists what each version needs, how to install it, and how to fix the usual errors.

Versions for each engine

EngineAndroid StudioNDKTarget SDKBuild-toolsJDK
5.8Koala 2024.1.2 Patch 1r27c3535.0.1OpenJDK 21
5.7Koala 2024.1.2 Patch 1r27c3535.0.1OpenJDK 21
5.6Koala 2024.1.2r27c34——
5.5Koala 2024.1.2r25b3434.0.0OpenJDK 17
5.4Flamingo 2022.2.1 Patch 2r25b34 (33 before 5.4.4)34.0.0OpenJDK 17

These come from Epic's Android Development Requirements page, which doesn't list build-tools or the JDK separately for 5.6. The setup script below installs the right ones for your engine anyway.

All of these versions can install on devices running Android 8.0 (API level 26) and up.

When you install an NDK by hand, the SDK Manager lists it by number rather than by letter: r25b is 25.1.8937393, and r27c is 27.2.12479018.

16 KB memory pages

Google Play requires new apps and updates that target Android 15 or later to support 16 KB memory pages. Epic lists that support from Unreal Engine 5.6 on.

Install everything

Install the Android Studio version for your engine from the table. Older versions are in Android Studio's download archive.

Open Android Studio once and finish its setup wizard, which installs the Android SDK. In SDK Manager → SDK Tools, also install Android SDK Command-line Tools (latest).

Close the Unreal Editor, then run the setup script that comes with the engine, in Engine/Extras/Android:

"C:\Program Files\Epic Games\UE_5.7\Engine\Extras\Android\SetupAndroid.bat"
"/Users/Shared/Epic Games/UE_5.7/Engine/Extras/Android/SetupAndroid.command"
./Engine/Extras/Android/SetupAndroid.sh

It installs the NDK, SDK platform and build-tools your engine version expects, and sets the environment variables that point Unreal to them.

Restart your computer, so every program sees the new environment variables.

You can also install from the editor: Platforms → Android → Install SDK runs Unreal's Turnkey installer, which does the same job.

Where Unreal looks

Unreal finds the tools through three environment variables, which the setup script sets:

VariablePoints toUsually
ANDROID_HOMEThe Android SDK%LOCALAPPDATA%\Android\Sdk on Windows
NDKROOTThe NDK version for your engine…\Sdk\ndk\27.2.12479018
JAVA_HOMEThe JDKThe jbr folder in Android Studio's install folder

A project can override all three in Project Settings → Platforms → Android SDK, with Location of Android SDK, Location of Android NDK and Location of JAVA.

Several engine versions on one machine

5.5 and 5.6 need different NDKs. Install both through the SDK Manager (they sit side by side in the ndk folder), then set Location of Android NDK in each project's settings, so each one uses the NDK its engine expects.

Common errors

"Android is not a valid platform to build"

Platform Android is not a valid platform to build. Check that the SDK is installed properly

Unreal can't find the SDK or NDK, or found versions it doesn't accept. Run the setup script again, restart, and check that ANDROID_HOME and NDKROOT point to folders that exist and match the table above.

"You have not accepted the license agreements"

The SDK needs its licenses accepted once. In Project Settings → Platforms → Android, click Accept SDK License, or run the SDK Manager from a terminal:

"%LOCALAPPDATA%\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat" --licenses
~/Library/Android/sdk/cmdline-tools/latest/bin/sdkmanager --licenses
~/Android/Sdk/cmdline-tools/latest/bin/sdkmanager --licenses

Answer y to each one.

The setup script fails with "Update failed"

Update failed. Please check the Android Studio install.

The script uses the SDK command-line tools, which Android Studio doesn't always install. Install Android SDK Command-line Tools (latest) from SDK Manager → SDK Tools, then run the script again. If you installed Android Studio somewhere other than the default folder, the script won't find it, and you need to edit the path at the top of the script.

Gradle errors about Java

Errors like Unsupported class file major version come from Gradle running with the wrong JDK. Point JAVA_HOME, or Location of JAVA in Project Settings, at the jbr folder inside the Android Studio version from the table, then package again.

Packaging

With everything installed, package from the editor with Platforms → Android, or from the command line with -platform=Android -cookflavor=ASTC. See Package from the command line.

Skip the setup

On this page