SetupAndroid.bat Not Working for Any Engine Anymore!!!

I was getting the exact same error. I did this same install with UE 5.1 a few weeks ago and it worked fine. I compared the installs and it looks like there was an update to the Android command-line Tools.

Here’s how I fixed it:

  1. Go into Android Studio and under Configure → SDK Manager
  2. On the SDK Tools tab, select “Show Package Details” in the bottom right
  3. Uncheck Android SDK command-line Tools (latest)
  4. Check Android SDK command-line Tools 8.0
  5. Click Apply
  6. In Windows go to “C:\Users\USERNAME\AppData\Local\Android\Sdk\cmdline-tools” and rename the 8.0 folder to “latest”
  7. Run SetupAndroid.bat again

I think that was everything. Basically just need to downgrade the command line tools. You could also go into the SetupAndroid.bat file and change the path from “latest” to 8.0 if you want, either way should work.

51 Likes