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
| Engine | Android Studio | NDK | Target SDK | Build-tools | JDK |
|---|---|---|---|---|---|
| 5.8 | Koala 2024.1.2 Patch 1 | r27c | 35 | 35.0.1 | OpenJDK 21 |
| 5.7 | Koala 2024.1.2 Patch 1 | r27c | 35 | 35.0.1 | OpenJDK 21 |
| 5.6 | Koala 2024.1.2 | r27c | 34 | — | — |
| 5.5 | Koala 2024.1.2 | r25b | 34 | 34.0.0 | OpenJDK 17 |
| 5.4 | Flamingo 2022.2.1 Patch 2 | r25b | 34 (33 before 5.4.4) | 34.0.0 | OpenJDK 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.shIt 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:
| Variable | Points to | Usually |
|---|---|---|
ANDROID_HOME | The Android SDK | %LOCALAPPDATA%\Android\Sdk on Windows |
NDKROOT | The NDK version for your engine | …\Sdk\ndk\27.2.12479018 |
JAVA_HOME | The JDK | The 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 properlyUnreal 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 --licensesAnswer 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
Unreal Engine packaging errors, explained
What ExitCode=25, ExitCode=6, Unknown Cook Failure, LNK2019, Live Coding and other Unreal Engine packaging errors mean, how to find the real error, and how to fix the common ones.
Upload an Unreal Engine build to Steam with steamcmd
Upload a packaged Unreal Engine build to a Steam beta branch with steamcmd: the build script, depots for each platform, Steam Guard on a build machine, and the common errors.