Download

ANT Build Failed (Build.xml line 892, 894, 906, 283)

Hi guys, I’m having trouble building an APK for my project. It all worked fine, then at seemingly random I started getting this error, not sure what caused it because I had done quite a bit of work (scenery, nothing scripted).

Here’s what the most relevant part of the output log says:


 =================================================================
 MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging...
 MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.MakeApk:
 MainFrameActions: Packaging (Android (ETC2)): ====17/2/2015 5:55:41 PM====PERFORMING FINAL APK PACKAGE OPERATION================================================
 MainFrameActions: Packaging (Android (ETC2)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
 MainFrameActions: Packaging (Android (ETC2)):     [javac] Note: D:\Mantri\Explorer\Intermediate\Android\APK\src\com\android\vending\licensing\LicenseChecker.java uses or overrides a deprecated API.
 MainFrameActions: Packaging (Android (ETC2)):     [javac] Note: Recompile with -Xlint:deprecation for details.
 MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
 MainFrameActions: Packaging (Android (ETC2)): D:\NVPACK_Full\android-sdk-windows	ools\ant\build.xml:892: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (ETC2)): D:\NVPACK_Full\android-sdk-windows	ools\ant\build.xml:894: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (ETC2)): D:\NVPACK_Full\android-sdk-windows	ools\ant\build.xml:906: The following error occurred while executing this line:
 MainFrameActions: Packaging (Android (ETC2)): D:\NVPACK_Full\android-sdk-windows	ools\ant\build.xml:283: null returned: 1
 MainFrameActions: Packaging (Android (ETC2)): Total time: 5 seconds
 MainFrameActions: Packaging (Android (ETC2)): BuildCommand.Execute: ERROR: BUILD FAILED
 MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: AutomationTool terminated with exception:
 MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c "D:\NVPACK_Full\apache-ant-1.8.2/bin/ant.bat" -quiet debug
 MainFrameActions: Packaging (Android (ETC2)): Stacktrace:    at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingD
 MainFrameActions: Packaging (Android (ETC2)): irectory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
 MainFrameActions: Packaging (Android (ETC2)):    at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage)
 MainFrameActions: Packaging (Android (ETC2)):    at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor)
 MainFrameActions: Packaging (Android (ETC2)):    at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC2)):    at Project.Package(ProjectParams Params, Int32 WorkingCL)
 MainFrameActions: Packaging (Android (ETC2)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
 MainFrameActions: Packaging (Android (ETC2)):    at BuildCommand.Execute()
 MainFrameActions: Packaging (Android (ETC2)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
 MainFrameActions: Packaging (Android (ETC2)):    at AutomationTool.Automation.Process(String] CommandLine)
 MainFrameActions: Packaging (Android (ETC2)):    at AutomationTool.Program.MainProc(Object Param)
 MainFrameActions: Packaging (Android (ETC2)):    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
 MainFrameActions: Packaging (Android (ETC2)):    at AutomationTool.Program.Main()
 MainFrameActions: Packaging (Android (ETC2)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "D:\NVPACK_Full\apache-ant-1.8.2/bin/ant.bat" -quiet debug
 MainFrameActions: Packaging (Android (ETC2)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC2)): Program.Main: AutomationTool exiting with ExitCode=1
 MainFrameActions: Packaging (Android (ETC2)): Domain_ProcessExit
 MainFrameActions: Packaging (Android (ETC2)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
 MainFrameActions: Packaging (Android (ETC2)): copying UAT log files...
 MainFrameActions: Packaging (Android (ETC2)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
 MainFrameActions: Packaging (Android (ETC2)): BUILD FAILED
 

Upon Googling it seems like it’s not an UE-related issue, but an Android in general, so I thought I’d ask here for some advice/pointers.

I posted on the AnswerHub so just in case it gets answered there I’ll link it from here for future reference.

Update: So apparently this is an issue unrelated to my project as it occurs with the twinstick shooter sample as well. I’ll try reinstalling TADP, and if that doesn’t work - UE as well.

Update 2: Reinstalling TADP didn’t fix anything. I’ll try UE 4.7, and then a complete reinstall of UE.

Update 3: 4.7 Also didn’t help. Not sure what to try next, other than reinstalling UE or compiling from source.

Update 4: The issue somehow fixed itself after I shutdown the PC last night and booted it up today. I guess it was a temporary file issue.

I’ve been having the exact same issue this morning. It was working fine yesterday.

I have the same error. How can I fix it?

I wanted to chime in here as I have been plagued with this issue since setting up my new computer 4 days ago.

The issue was my antivirus in this case Kaspersky 2015. Once I uninstalled and re-built and then ran “ant clean” on my project’s intermediate android APK folder. Then recompiled everything was working again :slight_smile: