# UE 5.8 Android SDK Turnkey installation fails with SetupAndroid.bat Exit Code 4

**URL:** <https://forums.unrealengine.com/t/ue-5-8-android-sdk-turnkey-installation-fails-with-setupandroid-bat-exit-code-4/2833786>\
**Category:** Issues and Bug Reporting (Unreal Engine)\
**Tags:** unreal-engine\
**Created:** [September 24, 2026, 2:27am UTC](https://forums.unrealengine.com/t/ue-5-8-android-sdk-turnkey-installation-fails-with-setupandroid-bat-exit-code-4/2833786 "2026-09-24T02:27:03Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brokentv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@brokentv](https://forums.unrealengine.com/u/brokentv)\
**Post date:** [September 24, 2026, 2:27am UTC](https://forums.unrealengine.com/t/ue-5-8-android-sdk-turnkey-installation-fails-with-setupandroid-bat-exit-code-4/2833786/1 "2026-09-24T02:27:03Z")

</div>

### Summary

Hi,

I’m having trouble getting the Android SDK setup working through Turnkey in UE 5.8.

When I go to Platforms → SDK Management → Android → Install SDK, Turnkey starts the installation normally and detects the SDK requirements. However, it eventually fails when it runs SetupAndroid.bat.

### What Type of Bug are you experiencing?

Platform Mobile

### Steps to Reproduce

The fastest way is to create a new AR Template project. Then:

1. Go to Platforms \> SDK Management \> Android \> Install or Install Sdk (full Platform Installer)
2. Wait for installer to finish

### Expected Result

I would expect Unreal Engine to detect the installed Android SDK components and complete the Android SDK setup successfully.

### Observed Result

The installer will not finish. It will ask if you want to retry, but however many times retry will fail. When I click not want to retry, i will get Installation Failed

### Affects Versions

5.8

### Platform(s)

Android

### Upload an image

 ![Screenshot 2026-09-24 101900.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/4/6/346b7b5fe5875fa61d6512119c1a91af3c771fe8.png)

### Additional Notes

I was able to get past the error by creating a separate .bat file to install and configure the required Android components. But i have no idea how to pass it to you. You can get it from here :

> **[GitHub - syazani2902/android-sdk-setup-for-unreal: An unofficial Windows batch script for setting up...](https://github.com/syazani2902/android-sdk-setup-for-unreal)**
>
> An unofficial Windows batch script for setting up the Android SDK, NDK and JDK required for Unreal Engine Android development. Not affiliated with or endorsed by Epic Games.

Hope it helps
