Issue with Android Project Packaging

Hi, I am trying to package a VR UE 5.6 Project with Android, but keep experiencing an error message. Here are some of the lines from what the output log shows me:

LogTurnkeySupport: Project requires temp target (OpenXREyeTracker plugin is enabled)
LogLauncherProfile: Unable to use promoted target - ../../../../../../(hidden)/Unreal Projects/VR_Anatomy_Lab/Binaries/Android/UnrealGame.target does not exist.

UATHelper: Packaging (Android (ETC2)): Parsing command line: -ScriptsForProject=“C:/(hidden)/Unreal Projects/VR_Anatomy_Lab/VR_Anatomy_Lab.uproject” Turnkey -command=VerifySdk -platform=Android -UpdateIfNeeded -EditorIO -EditorIOPort=49600 -project=“C:/(hidden)/Unreal Projects/VR_Anatomy_Lab/VR_Anatomy_Lab.uproject” BuildCookRun -nop4 -utf8output -nocompileeditor -skipbuildeditor -cook -project=“C:/(hidden)/Unreal Projects/VR_Anatomy_Lab/VR_Anatomy_Lab.uproject” -unrealexe=“C:\Program Files\Epic Games\UE_5.6\Engine\Binaries\Win6
4\UnrealEditor-Cmd.exe” -platform=Android -cookflavor=ETC2 -installed -stage -archive -package -build -pak -iostore -compressed -prereqs -archivedirectory=“C:/(hidden)/Unreal Projects/VR_Anatomy_Lab” -clientconfig=Development -nocompile -nocompileuat
UATHelper: Packaging (Android (ETC2)): Initializing script modules…

UATHelper: Packaging (Android (ETC2)): BUILD SUCCESSFUL
UATHelper: Packaging (Android (ETC2)): Setting up ProjectParams for C:\(hidden)\Unreal Projects\VR_Anatomy_Lab\VR_Anatomy_Lab.uproject
UATHelper: Packaging (Android (ETC2)): Project contains multiple Game targets (VR_Anatomy_Lab, VR_Basic) but no DefaultGameTarget is set in the [/Script/BuildSettings.BuildSettings] section of DefaultEngine.ini

UATHelper: Packaging (Android (ETC2)): AutomationTool executed for 0h 0m 1s
UATHelper: Packaging (Android (ETC2)): AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (ETC2)): BUILD FAILED
PackagingResults: Error: Unknown Error

Would anyone have any inputs as to what I could do to resolve this issue? I’ve seen some previous posts about setting a DefaultGameName in the DefaultEngine.ini file, and have tried that, but the same issue still arose.

Thanks in advance!

Hello there @sh4dowmon!

Checking through your log extract, they key error you are getting here is the following:

Project contains multiple Game targets (VR_Anatomy_Lab, VR_Basic) but no DefaultGameTarget is set in [/Script/BuildSettings.BuildSettings] of DefaultEngine.ini

This means the engine is not being able to choose a proper target for Android, so it never generates the game file, and the whole process crashes with exit code 1.

The automation tool is probably seeing multiple targetts in your build, so the solution here would be to locate any files ending in “***.Target.cs” and rename, move, or delete them. This way, the engine will locate the correct target for your build, and packaging should work as intended.

For further details and methods to deal with this error, you can also check the related threads below, as well as a video example about it: