Cannot install Android SDK despite versions matching.

I have attempted to install the Android SDK for UE 5.7.4 several times, including on a completely fresh machine with no prior installs of either UE or Android Studio. 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.