Deployment Error Android : Error: Unknown Error

Hello there,

I was trying to deploy my game on an Android tablet and there, BOOM !

It seems to happend to Windows x64 too…

An error I’ve never seen before, here’s the error (full logs of my package attempt) :

UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Running AutomationTool...
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/PortesOuvertes/sinkthatboat/sinkthatboat.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/PortesOuvertes/sinkthatboat/sinkthatboat.uproject -cook -stage -archive -archivedirectory=C:/Users
/LEHMDAV/Desktop -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Android -cookflavor=Multi -build -utf8output
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): BuildCookRun.SetupParams: Setting up ProjectParams for C:\PortesOuvertes\sinkthatboat\sinkthatboat.uproject
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Program.Main: ERROR: AutomationTool terminated with exception: System.ArgumentException: Un élément avec la même clé a déjà été ajouté.
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à System.Collections.Generic.Dictionary`2.Add(TKey key, TValue value)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectUtils.CompileAndLoadTargetsAssembly(ProjectProperties Properties, FileReference TargetsDllFilename, Boolean DoNotCompile, List`1 TargetScripts)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectUtils.DetectTargetsForProject(ProjectProperties Properties, List`1 ExtraSearchPaths)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectUtils.DetectProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectUtils.GetProjectProperties(FileReference RawProjectPath, List`1 ClientTargetPlatforms, Boolean AssetNativizationRequested)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectParams.AutodetectSettings(Boolean bReset)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.ProjectParams..ctor(FileReference RawProjectPath, BuildCommand Command, String Device, String MapToRun, String AdditionalServerMapParams, ParamList`1 Port, String RunCommandline, String StageCommandline, String BundleName, String StageDirectoryParam, String UE4Exe, Strin
g SignPak, List`1 ClientConfigsToBuild, List`1 ServerConfigsToBuild, ParamList`1 MapsToCook, ParamList`1 MapIniSectionsToCook, ParamList`1 DirectoriesToCook, String InternationalizationPreset, ParamList`1 CulturesToCook, ParamList`1 ClientCookedTargets, ParamList`1 EditorTargets, ParamList`1 ServerCookedTargets, List`1 ClientTargetPlatforms, Dictionary`2 Cli
entDependentPlatformMap, List`1 ServerTargetPlatforms, Dictionary`2 ServerDependentPlatformMap, Nullable`1 Build, Nullable`1 SkipBuildClient, Nullable`1 SkipBuildEditor, Nullable`1 Cook, Nullable`1 Run, Nullable`1 SkipServer, Nullable`1 Clean, Nullable`1 Compressed, Nullable`1 UseDebugParamForEditorExe, Nullable`1 IterativeCooking, Nullable`1 IterateSharedCo
okedBuild, Nullable`1 IterateSharedBuildUsePrecompiledExe, Nullable`1 CookAll, Nullable`1 CookPartialGC, Nullable`1 CookInEditor, String CookOutputDir, Nullable`1 CookMapsOnly, Nullable`1 CookOnTheFly, Nullable`1 CookOnTheFlyStreaming, Nullable`1 UnversionedCookedContent, Nullable`1 EncryptIniFiles, Nullable`1 EncryptPakIndex, Nullable`1 EncryptEverything, N
ullable`1 SkipCookingEditorContent, Nullable`1 NumCookersToSpawn, String AdditionalCookerOptions, String BasedOnReleaseVersion, String CreateReleaseVersion, String CreateReleaseVersionBasePath, String BasedOnReleaseVersionBasePath, Nullable`1 GeneratePatch, Nullable`1 AddPatchLevel, Nullable`1 StageBaseReleasePaks, String DLCName, String DiffCookedContentPat
h, Nullable`1 DLCIncludeEngineContent, Nullable`1 CrashReporter, Nullable`1 DedicatedServer, Nullable`1 Client, Nullable`1 Deploy, String DeployFolder, Nullable`1 FileServer, Nullable`1 Foreign, Nullable`1 ForeignCode, Nullable`1 LogWindow, Nullable`1 NoCleanStage, Nullable`1 NoClient, Nullable`1 NoDebugInfo, Nullable`1 MapFile, Nullable`1 NoXGE, Nullable`1 
Package, Nullable`1 Pak, Nullable`1 Prereqs, String AppLocalDirectory, Nullable`1 NoBootstrapExe, Nullable`1 SignedPak, Nullable`1 NullRHI, Nullable`1 FakeClient, Nullable`1 EditorTest, Nullable`1 RunAutomationTests, String RunAutomationTest, Nullable`1 CrashIndex, Nullable`1 SkipCook, Nullable`1 SkipCookOnTheFly, Nullable`1 SkipPak, Nullable`1 SkipStage, Nu
llable`1 Stage, Nullable`1 Manifests, Nullable`1 CreateChunkInstall, Nullable`1 Unattended, Nullable`1 NumClients, Nullable`1 Archive, String ArchiveDirectoryParam, Nullable`1 ArchiveMetaData, Nullable`1 CreateAppBundle, ParamList`1 ProgramTargets, Nullable`1 Distribution, Nullable`1 Prebuilt, Nullable`1 RunTimeoutSeconds, String SpecifiedArchitecture, Nulla
ble`1 IterativeDeploy, Nullable`1 FastCook, Nullable`1 IgnoreCookErrors, Nullable`1 RunAssetNativization, Nullable`1 CodeSign, Nullable`1 TreatNonShippingBinariesAsDebugFiles, String Provision, String Certificate, String Team, Boolean AutomaticSigning, ParamList`1 InMapsToRebuildLightMaps, ParamList`1 TitleID)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à BuildCookRun.SetupParams()
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à BuildCookRun.ExecuteBuild()
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.BuildCommand.Execute()
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.Automation.Execute(List`1 CommandsToExecute, Dictionary`2 Commands)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.Automation.Process(String[] Arguments)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.Program.MainProc(Object Param)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.InternalUtils.RunSingleInstance(Func`2 Main, Object Param)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)):    à AutomationTool.Program.Main()
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): BUILD FAILED
PackagingResults: Error: Unknown Error

Thank’s for the future answers.

Have a nice day, the SinkThatBoat Team.

Hi, thanks for your answer. I’ve deleted the old projet completly (including the old target.cs files) & this still doesn’t work (exactly same error).

Here’s my Target.cs :

using UnrealBuildTool;
using System.Collections.Generic;

public class sinkthatboatTarget : TargetRules
{
    public sinkthatboatTarget(TargetInfo Target) : base(Target)     {
        Type = TargetType.Editor;
        ExtraModuleNames.Add("sinkthatboat");
    }
}

It seems that I should change Type = TargetType.Editor; to Type = TargetType.Game; but this throw me another error :

UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Running AutomationTool...
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Automation.ParseCommandLine: Parsing command line: -ScriptsForProject=C:/PortesOuvertes/sinkthatboat/sinkthatboat.uproject BuildCookRun -nocompile -nocompileeditor -installed -nop4 -project=C:/PortesOuvertes/sinkthatboat/sinkthatboat.uproject -cook -stage -archive -archivedirectory=C:/Users
    /LEHMDAV/Desktop -package -clientconfig=Development -ue4exe=UE4Editor-Cmd.exe -pak -prereqs -nodebuginfo -targetplatform=Android -cookflavor=Multi -build -utf8output
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): BuildCookRun.SetupParams: Setting up ProjectParams for C:\PortesOuvertes\sinkthatboat\sinkthatboat.uproject
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): DynamicCompilation.CompileAssembly: Messages while compiling C:\Users\LEHMDAV\AppData\Local\Temp\UAT\C+Program+Files+Epic+Games+UE_4.17\Rules\UATRules1375791597.dll:
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): DynamicCompilation.CompileAssembly: ERROR: c:\PortesOuvertes\sinkthatboat\Source\sinkthatboat.Target.cs(6,14) : error CS0101: L'espace de noms '<espace de noms global>' contient déjà une définition de 'sinkthatboatTarget'
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Program.Main: ERROR: AutomationTool terminated with exception: ERROR: UnrealBuildTool encountered an error while compiling source files
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): Program.Main: AutomationTool exiting with ExitCode=1 (Error_Unknown)
    UATHelper: Packaging (Android (Multi:ASTC,PVRTC,DXT,ATC,ETC2,ETC1)): BUILD FAILED
    PackagingResults: Error: Unknown Error

Finally fixed. Thanks, another target.cs was hanging around with another name.

It looks like you cloned or duplicated your project in the past or running the project from a drive/ dropbox folder. Can you search for “.target” in your project folder and delete one of the .target files (possibly making a backup before doing so)? More information about your Error can be found here