I am getting the "automation tool was unable to run successfully" error when packaging to android

I had packaged my game several times before without a hitch when suddenly, for seemingly no reason, it began to fail. It is giving me the infamous automation error along with another error which reads as follows:

MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" debug

Here is the end of my log (where it fails):

 MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: 
 MainFrameActions: Packaging (Android (ETC1)): ====7/12/2015 9:15:29 PM====PREPARING NATIVE CODE=================================================================
 MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging...
 MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.MakeApk: 
 MainFrameActions: Packaging (Android (ETC1)): ====7/12/2015 9:15:30 PM====PERFORMING FINAL APK PACKAGE OPERATION================================================
 MainFrameActions: Packaging (Android (ETC1)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
 MainFrameActions: Packaging (Android (ETC1)): Buildfile: build.xml does not exist!
 MainFrameActions: Packaging (Android (ETC1)): Build failed
 MainFrameActions: Packaging (Android (ETC1)): BuildCommand.Execute: ERROR: BUILD FAILED
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: AutomationTool terminated with exception:
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" debug
 MainFrameActions: Packaging (Android (ETC1)): Stacktrace:    at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDirectory, St
 MainFrameActions: Packaging (Android (ETC1)): ring Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
 MainFrameActions: Packaging (Android (ETC1)):    at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage, Boolean bDisallowPackagingDataInApk)
 MainFrameActions: Packaging (Android (ETC1)):    at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bIsDataDeploy)
 MainFrameActions: Packaging (Android (ETC1)):    at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC1)):    at Project.Package(ProjectParams Params, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC1)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
 MainFrameActions: Packaging (Android (ETC1)):    at BuildCommand.Execute()
 MainFrameActions: Packaging (Android (ETC1)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
 MainFrameActions: Packaging (Android (ETC1)):    at AutomationTool.Automation.Process(String[] CommandLine)
 MainFrameActions: Packaging (Android (ETC1)):    at AutomationTool.Program.MainProc(Object Param)
 MainFrameActions: Packaging (Android (ETC1)):    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
 MainFrameActions: Packaging (Android (ETC1)):    at AutomationTool.Program.Main()
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "C:/NVPACK/apache-ant-1.8.2/bin/ant.bat" debug
 MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC1)): Program.Main: AutomationTool exiting with ExitCode=1
 MainFrameActions: Packaging (Android (ETC1)): Domain_ProcessExit
 MainFrameActions: Packaging (Android (ETC1)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC1)): copying UAT log files...
 MainFrameActions: Packaging (Android (ETC1)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
 MainFrameActions: Packaging (Android (ETC1)): BUILD FAILED

My project was made 100% in blueprints and as you can see I am trying to package for android etc1. I have tried to package in 4.8.1 and 4.7.6 and receive the same error message in both cases. All my sdk’s are installed properly and up to date. Packaging works fine in an empty project so I believe it may be something specific to this one. I have tried everything and any help would be greatly appreciated!

Bump

I have a similar issue :confused:

same issue happened to me with UE4.10.1 today. I suspect that “ue4 Buildfile: build.xml does not exist!” tries to point me somewhere. What could be wrong?

ah, turned out my problem was with the android version. 4.10.1 default to android-19 API version for some reason. I didn’t pick that at the beginning. I changed that in project settings and it’s working now.