Launch on Android - source code building command

Hello,

Do I have to build source code with “-set:WithAndroid=true” if i want build/launch project in android devces?
I must build source code in command line, and I use this command:

"...\Engine\Build\BatchFiles\RunUAT.bat" BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -set:HostPlatformOnly=true

but if i use this command:

"...\Engine\Build\BatchFiles\RunUAT.bat" BuildGraph -target="Make Installed Build Win64" -script=Engine/Build/InstalledEngineBuild.xml -set:WithWin64=true -set:WithWin32=true -set:WithMac=false -set:WithAndroid=true -set:WithIOS=false -set:WithTVOS=false -set:WithLinux=false -set:WithHTML5=false -set:WithDDC=false 

I got this error:

UnrealBuildTool: UnrealBuildTool Exception: ERROR: GetBuildPlatform: No BuildPlatform found for Android
CommandUtils.Run: Run: Took 10,8918081s to run UnrealBuildTool.exe, ExitCode=5
Node.Build: Failed to execute task.
Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)

I have installed: Android SDK, NDK, JDK, Apache ANT

Thanks!

Hello Daviv,

Do you get the same result if you compile the engine directly from Visual Studio? Is the editor recognizing your Android device? Also, please ensure that Android is set as a supported platform in your Project Settings before attempting to package.

We haven’t heard from you in a while, Daviv. Are you still experiencing this issue? If so, have you tried what I mentioned in my previous comment? What were the results? In the meantime I’ll be marking this issue as resolved for tracking purposes.

Sorry, for absence.
I don’t have problem with compiling engine from Virtual Studio, compiling process was always completed successfully.
Android is set as supported platform in project settings, and editor recognizing my android device.
I’m trying to build source code through command line (byJenkisn) because I need a LocalBuilds folder.

Hello Daviv, are you still experiencing this issue? I apologize for the delay but I lost track of this.

Hello Matthew, nothing happened :). For now I had to give up this problem, but in a while I will have to go back to it.

Alright, I’m going to look into this sometime this afternoon. I’m not familiar with using in general so I’ll see if I can get it working.

I’m continuing to look into this but from what I’ve seen so far, it doesn’t seem like you would need to build for Android specifically when building the editor to be able to package for Android.

From what I see, it doesn’t look like it would be required to build the editor for Android to be able to package for Android. There isn’t anything special that needs to be built either. Have you tried doing it to see if it works?

I am now running into the same issue. I successfully built for HostPlatformOnly, however, as soon as I try to configure the project for Android under Project Settings, it fails. It can’t write to the project file. Well, that’s because I’m missing my Android project.properties file in the Build folder. On top of that, the Android license is even missing from the engine directory. I can’t even agree to it.