UnrealBuildTool failed due to IOException error

When packaging my project, IOException error was occurred.

I am using UE 4.12.5. I tried to remove temporary folders, but failed.
My custom UE 4.12.5 and original UE 4.12.5 are same.

I am using MS Windows 10, MS Visual Studio 2015.

Please help me.

These error logs are.

UnrealBuildTool: ====8/31/2016 11:46:51 AM====PREPARING TO MAKE APK===============================================================

UnrealBuildTool: UnrealBuildTool Exception: System.IO.IOException: Cannot create a file when that file already exists.
UnrealBuildTool: at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
UnrealBuildTool: at System.IO.File.InternalMove(String sourceFileName, String destFileName, Boolean checkHost)
UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.MakeApk(AndroidToolChain ToolChain, String ProjectName, String ProjectDirec
tory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean b
IncrementalPackage, Boolean bDisallowPackagingDataInApk)
UnrealBuildTool: at UnrealBuildTool.UEDeployAndroid.PrepTargetForDeployment(UEBuildTarget InTarget)
UnrealBuildTool: at UnrealBuildTool.UnrealBuildTool.DoPostStartupStuffThatCanAccessConfigs(String[] Arguments)
CommandUtils.Run: Run: Took 0.9532009s to run UnrealBuildTool.exe, ExitCode=5
Program.Main: ERROR: AutomationTool terminated with exception: AutomationTool.AutomationException: Command failed (Result:5): C:\P
rogram Files (x86)\Epic Games\4.12\Engine\Binaries\DotNET\UnrealBuildTool.exe XXXX Android DebugGame -prepfordeploy -project="
XXXX.uproject" -NoHotReloadFromIDE -ignorejunk. See logfile for details: ‘UnrealBuildTool-2016.08.31-11.46.
at AutomationTool.CommandUtils.RunAndLog(String App, String CommandLine, String Logfile, Int32 MaxSuccessCode, String Input, ER
unOptions Options, Dictionary2 EnvVars) at AutomationTool.CommandUtils.RunUBT(CommandEnvironment Env, String UBTExecutable, String CommandLine, String LogName, Diction ary2 EnvVars)
at AndroidPlatform.PostBuildTarget(UE4Build Build, FileReference UProjectPath, String TargetName, String Config)
at AutomationTool.UE4Build.BuildWithUBT(String TargetName, UnrealTargetPlatform TargetPlatform, String Config, FileReference Up
rojectPath, Boolean ForceMonolithic, Boolean ForceNonUnity, Boolean ForceDebugInfo, Boolean ForceFlushMac, Boolean DisableXGE, Str
ing InAddArgs, Boolean ForceUnity, Dictionary2 EnvVars) at AutomationTool.UE4Build.Build(BuildAgenda Agenda, Nullable1 InDeleteBuildProducts, Boolean InUpdateVersionFiles, Boolean In
ForceNoXGE, Boolean InUseParallelExecutor, Boolean InForceNonUnity, Boolean InForceUnity, Boolean InShowProgress, Dictionary2 Pla tformEnvVars, Nullable1 InChangelistNumberOverride, Dictionary2 InTargetToManifest) at Project.Build(BuildCommand Command, ProjectParams Params, Int32 WorkingCL, ProjectBuildTargets TargetMask) at BuildCookRun.DoBuildCookRun(ProjectParams Params) at AutomationTool.BuildCommand.Execute() at AutomationTool.Automation.Execute(List1 CommandsToExecute, CaselessDictionary1 Commands) at AutomationTool.Automation.Process(String[] CommandLine) at AutomationTool.Program.MainProc(Object Param) at AutomationTool.InternalUtils.RunSingleInstance(Func2 Main, Object Param)
at AutomationTool.Program.Main()
Program.Main: AutomationTool exiting with ExitCode=5 (5)
copying UAT log files…

Hi Lakshimi,

I found a couple of similar issues that were resolved by clearing the AppData-Temp folder located:

C:\Users< username >\AppData\local\Temp folder

Please try this and let us know if it does not resolve the issue.



Thanks, but removing temporary files was no effect to me.

Please perform these troubleshooting steps:

  1. Create a new blank C++ Project; Third Person Template
  2. Make sure this (and original project) are named with less than 20 Characters and use no special characters
  3. Package to a folder on the desktop (set this in Project Settings>Packaging)
  4. Start with a blank output log and cut and paste entire results into a text document and link results here.
  5. If blank project is successful, try again with your project, following the naming conventions in step #2
  6. If it fails, supply the entire contents of Output Log as in step #4

Hi Lakshimi,

Since we have not heard back from you in a while we are marking this post “resolved” for tracking purposes. However, if you are still receiving this packaging error, please respond with the requested information above and we will continue to investigate.



I solved this problem recently…
If proguard-project.backup is already exist, this error occurs.

Thanks, I want to know what occurs this problem.

I solved this problem, few days ago. I modified my own engine source, if proguard-project.backup file is already exist, remove it and move file.

Thanks for posting your solution.