# Failed to run SetupAndroid.bat for Unreal Engine 4.27.2

**URL:** <https://forums.unrealengine.com/t/failed-to-run-setupandroid-bat-for-unreal-engine-4-27-2/1586898>\
**Category:** Getting Started & Setup\
**Tags:** Android-Studio, unreal-engine, nvidia, question\
**Created:** [January 4, 2024, 8:02am UTC](https://forums.unrealengine.com/t/failed-to-run-setupandroid-bat-for-unreal-engine-4-27-2/1586898 "2024-01-04T08:02:05Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Johnnyman](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Johnnyman](https://forums.unrealengine.com/u/Johnnyman)\
**Post date:** [January 6, 2024, 4:21pm UTC](https://forums.unrealengine.com/t/failed-to-run-setupandroid-bat-for-unreal-engine-4-27-2/1586898/2 "2024-01-06T16:21:37Z")

</div>

I got a solution from this:

> [@Android "SetupAndroid.bat" keeps giving this error "was unexpected at this time." UE 4-26](https://forums.unrealengine.com/t/android-setupandroid-bat-keeps-giving-this-error-was-unexpected-at-this-time-ue-4-26/269323):
>
> I’m at a complete loss here, I’m trying to setup Android Development and have tried 4 different methods even followed the Unreal Engine guide but every time I run the SetupAndroid.bat to install the NDK I get this error C:\Program Files\Epic Games\UE\_4.26\Engine\Extras\Android\>SetupAndroid.bat Android Studio Path: C:\Program Files\Android\Android Studio Android Studio SDK Path: C:\Users\depre\AppData\Local\Android\Sdk \Microsoft was unexpected at this time. If anyone could shed some light onto…

---

_[View the full topic](https://forums.unrealengine.com/t/failed-to-run-setupandroid-bat-for-unreal-engine-4-27-2/1586898)._
