ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly

I’m trying to use RunUAT.bat to build a plugin but it fails and displays this error message - ERROR: Platform Android is not a valid platform to build. Check that the SDK is installed properly.

I have used Visual Studio Installer to get Android SDK but that didn’t fix the issue. Will downloading Android Studio fix it or is the issue caused by something else?

4 Likes

I had to install the right version of the SDK, NDK and JDK to get around the Platform Android is not a valid platform to build error.

After all this - I had to go into the Unreal Engine project settings, Platform, Android SDK, then set all 3 of the above settings to their correct directory.

5 Likes

Recently I found one rather interesting android spy apps project, which is a useful project for me. Besides, this project inspires me a lot. I am happy that you managed to find a solution to the problem, and I’m grateful that you also shared your solution.

This works, thanks!
Edit: until I get the “cmd.exe failed…” error.

In my experience, UE needs to use the default JDK of Android Studio 4.0
I installed open jdk8 because I am trying unity
Uninstalling open JDK and reinstalling Android Studio 4.0 will be useful,

You can find earlier JDK here.

Java Archive Downloads - Java SE 8 (oracle.com)

I fix it by my own way.

  1. i install new version of .Net. i use ue5.2 so sysem recomend me install .NET 6.0.302. Find it and install it.

  2. I choose newer SDK and NDK. This is my screenshot


You can install New API version in Android studio in configure setting.
I dont know if it work for you. But i guest you should try

1 Like

I have found the issue in UE5.3 that it sets NDK link incorrectly after each build and you need to set it again. You do not need to reboot your Windows, but you need to set it again after each build.

UE 5.X becomes a stupid engine with lots of issues. I have submitted a bug, but for the last 5 years, I have never gotten an email that the bug has been added, reviewed, or solved.

2 Likes

Hi
where i can find this settings?

This is Windows environment variables: this should help

This works, thanks!
NDK_ROOT settings.

1 Like

This is the solution! thank you ma man!
Unreal 5.4 seems to be really bad reading path with both “/” and "". I replaced all “/” with "" and the issue has been fixed!