r/UnrealEngine5 • u/Majestic-Option-2236 • 4d ago
Cannot install Android SDK despite versions matching.
I have attempted to install the Android SDK for UE 5.7.4 several times. I always get stuck while running SetupAndroid.bat (or using the install SDK options in UE) with no errors other than “Update failed. Please check the Android Studio install.”
I am using:
Unreal Engine 5.7.4 with target platforms Android enabled
Android Studio Koala 2024.1.2 Patch 1 September 17, 2024
Android SDK (platform 34, build tools 35.0.1)
Android SDK Command-line tools installed
Android NDK (version installed by the SetupAndroid script, 27.2.12479018
JDK 21.0.3 (though the JAVA_HOME path is set to the java install included in Android Studio)
ANDROID_HOME set to AppData/Local/Android/Sdk
JAVA_HOME set to Program Files/Android/Android Studio/jbr
The sdk/tools and sdk/platform-tools
paths set correctly in the Path environment variable
To my knowledge, these version should be correct. As a sanity check I cleared all Android Studio and SDK installs and environment variables and followed the steps of this tutorial with the same result. https://youtu.be/Sc13U_qANHI.
Here is the full output of SetupAndroid.bat:
Android Studio Path: C:\Program Files\Android\Android Studio
Android Studio SDK Path: C:\Users\braml\AppData\Local\Android\Sdk
Using sdkmanager: C:\Users\braml\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat WARNING: The SDK Manager CLI tool (sdkmanager) is deprecated. Android CLI will be used instead. The ‘android’ binary can also be found in the cmdline-tools directory, and ‘android sdk’ is the replacement for ‘sdkmanager’. To learn more about the Android CLI and how to use it, see the documentation (https://d.android.com/tools/agents/android-cli)
Update failed. Please check the Android Studio install. Press any key to continue . . .
I would appreciate it if someone could help me out here.
1
u/StreetNo1759 4d ago
that "Update failed" line doesn't tell you much. the script prints it whenever sdkmanager.bat exits with an error code, and in your output the only thing sdkmanager said was the deprecation notice. so my guess is the newest command-line tools are the problem, not your versions.
two ways around it:
- in Android Studio, SDK Manager > SDK Tools, tick Show Package Details and install an older Android SDK Command-line Tools version, one from before the Android CLI change. the script only looks in cmdline-tools\latest\bin and then tools\bin, so uninstall latest and rename the older version's folder to latest
- or skip the script. all it does is install platform-tools, the platform, build-tools, cmake and the ndk, then set NDKROOT and NDK_ROOT. open Engine\Extras\Android\SetupAndroid.bat in your 5.7 install, the versions it wants are on the SET lines near the top. tick those same versions in SDK Manager, add NDKROOT and NDK_ROOT as user environment variables pointing at Sdk\ndk\27.2.12479018, and restart the editor
if you want the real error first, run the call sdkmanager line from the bat by hand in cmd and check echo %errorlevel% after it.