Repro Rate: 5/5
This issue was encountered in the 5.1.0 live launcher build of //UE5/Release-5.1 at CL 23058290 and reproduced by other users.
Regression tested against the 5.0.3 live launcher build of //UE5/Release-5.0 at CL 20979098 and confirmed to not be a regression since same unhandled exception found in the current 5.1.0 build is also encountered in the previous 5.0.3 build.
This was initially found with Android as the target platform but also occurred when setting Windows as the target platform.
RunUAT.bat BuildPlugin -StrictIncludes -Plugin=[PathToPlugin]/MyPlugin.uplugin -TargetPlatforms=Android -nop4 -ScriptDir=[Workspace]/Engine -compile -installed -unrealexe=[Workspace]/Engine/Binaries/Win64/UnrealEditor-Cmd.exe -Package=[PathToPackage]
[PathToPlugin] - Replace this with the path to the plugin.
[Workspace] - Replace this with the UE workspace directory.
[PathToPackage] - Replace this with the path to where the package should be.
ForceCompile not supported if Unreal.IsEngineInstalled() == true Unhandled exception: One or more errors occurred. (An item with the same key has already been added. Key: C:\Program Files\Epic Games\UE_5.1\Engine\Source\Programs\AutomationTool\Android\Android.Automation.csproj)
: Engine precompiled files for Android should be put in the following path:
There's no existing public thread on this issue, so head over to Questions & Answers just mention UE-172233 in the post.