SetupAndroid.bat UE 5.1 Error

Hi, i am trying to set Up Android SDK and NDK for my Unreal Engine 5.1 VR project in order to be able to use an oculus quest 2. I have followed the How to Set Up Android SDK and NDK For Your Unreal Engine Development Environment | Unreal Engine 5.1 Documentation .



But when i am trying to run the SetupAndroid.bat i get the following error and i dont know how to resolve it.

I have tried reinstalling android studio several times with different API levels but it does not seem to work. Help with solutions to this issue would be very much appreciated!

1 Like

Same problem here! If someone knows a fix I’d be very happy if you let us know!

Have you both made sure that your Java is up to date as well?

Tried with different Versions. Always the same result.

I followed this vid and got it to work.
Unreal Engine 5.1 SDK - NDK - JDK Set-up Full Guide 2022 With Proof UE5.1 Android Mobile SDK NDK JDK - YouTube

1 Like

Worked out for me too. Important step is to set the environment variables for JAVA_HOME and the Path right

1 Like

Updated to version 17 of Java and added the correct path in system environmeant variables and this solved the problem! Thank you so much!

I had the same error. Only thing needed was to change NDK for higher version 25