ERROR: cmd.exe failed with args /c "C:\NVPACK\apache-ant-1.8.2/bin/ant.bat"

49392-okkkkkkkkk.png

Hey,

I have tried over 20 fixes on this website and non help.

It happens everytime I am trying to package the game in Distribution Failed mode.

Thanks!

MainFrameActions: Packaging (Android (All)): Project.Package: ********** PACKAGE COMMAND STARTED **********
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.MakeApk: 
MainFrameActions: Packaging (Android (All)): ====07/07/2015 18:13:45====PREPARING TO MAKE APK=================================================================
MainFrameActions: Packaging (Android (All)): Building Java with SDK API 'android-15'
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.CheckDependencies: S:\Users\Aaron\Desktop\MountainGoat_v0.8.2\Binaries/Android/MountainGoat-Android-Shipping.apk is out of date due to newer input file C:\Unreal Engine\Epic Games\4.6\Engine\Binaries\Android\UE4Game-Android-Shipping-armv7-e
MainFrameActions: Packaging (Android (All)): s2.so
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.MakeApk: Performing complete package - wiping S:\Users\Aaron\Desktop\MountainGoat_v0.8.2\Intermediate/Android/APK, except for predexedLibs
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.UpdateProjectProperties: 
MainFrameActions: Packaging (Android (All)): ====07/07/2015 18:13:51====UPDATING BUILD CONFIGURATION FILES====================================================
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Updating project.properties, local.properties, and build.xml...
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.MakeApk: 
MainFrameActions: Packaging (Android (All)): ====07/07/2015 18:13:53====PREPARING NATIVE CODE=================================================================
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Preparing native code for debugging...
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.MakeApk: 
MainFrameActions: Packaging (Android (All)): ====07/07/2015 18:13:56====PERFORMING FINAL APK PACKAGE OPERATION================================================
MainFrameActions: Packaging (Android (All)): UEDeployAndroid.RunCommandLineProgramAndThrowOnError: Making .apk with Ant... (note: it's safe to ignore javac obsolete warnings)
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\auth\GoogleAuthUtil.class(com\google\android\gms\auth:GoogleAuthUtil.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\common\api\GoogleApiClient.class(com\google\android\gms\common\api:GoogleApiClient.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\common\GooglePlayServicesUtil.class(com\google\android\gms\common:GooglePlayServicesUtil.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\ads\AdRequest.class(com\google\android\gms\ads:AdRequest.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\ads\AdView.class(com\google\android\gms\ads:AdView.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\ads\AdSize.class(com\google\android\gms\ads:AdSize.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\ads\AdListener.class(com\google\android\gms\ads:AdListener.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\plus\Plus.class(com\google\android\gms\plus:Plus.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\ads\AdRequest$Builder.class(com\google\android\gms\ads:AdRequest$Builder.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\plus\Account.class(com\google\android\gms\plus:Account.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\auth\UserRecoverableAuthException.class(com\google\android\gms\auth:UserRecoverableAuthException.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] warning: com\google\android\gms\auth\GoogleAuthException.class(com\google\android\gms\auth:GoogleAuthException.class): major version 51 is newer than 50, the highest major version supported by this compiler.
MainFrameActions: Packaging (Android (All)):     [javac] It is recommended that the compiler be upgraded.
MainFrameActions: Packaging (Android (All)):     [javac] Note: S:\Users\Aaron\Desktop\MountainGoat_v0.8.2\Intermediate\Android\APK\src\com\android\vending\licensing\LicenseChecker.java uses or overrides a deprecated API.
MainFrameActions: Packaging (Android (All)):     [javac] Note: Recompile with -Xlint:deprecation for details.
MainFrameActions: Packaging (Android (All)):     [javac] 12 warnings
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.cast.TextTrackStyle: can't find referenced class android.view.accessibility.CaptioningManager$CaptionStyle
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.dynamic.b: can't find referenced method 'android.app.Fragment getParentFragment()' in class android.app.Fragment
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.games.internal.PopupManager$PopupManagerHCMR1: can't find referenced method 'android.view.Display getDisplay()' in class android.view.View
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.games.internal.PopupManager$PopupManagerHCMR1: can't find referenced method 'void removeOnGlobalLayoutListener(android.view.ViewTreeObserver$OnGlobalLayoutListener)' in class android.view.ViewTreeObserver
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.internal.ec: can't find referenced method 'boolean isActiveNetworkMetered()' in class android.net.ConnectivityManager
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.internal.er: can't find referenced method 'java.lang.String getDefaultUserAgent(android.content.Context)' in class android.webkit.WebSettings
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: com.google.android.gms.internal.er: can't find referenced method 'void setMediaPlaybackRequiresUserGesture(boolean)' in class android.webkit.WebSettings
MainFrameActions: Packaging (Android (All)):  [proguard]       You should check if you need to specify additional program jars.
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: there were 9 unresolved references to classes or interfaces.
MainFrameActions: Packaging (Android (All)):  [proguard]          You may need to specify additional library jars (using '-libraryjars').
MainFrameActions: Packaging (Android (All)):  [proguard] Warning: there were 6 unresolved references to program class members.
MainFrameActions: Packaging (Android (All)):  [proguard]          Your input classes appear to be inconsistent.
MainFrameActions: Packaging (Android (All)):  [proguard]          You may need to recompile them and try again.
MainFrameActions: Packaging (Android (All)):  [proguard]          Alternatively, you may have to specify the option 
MainFrameActions: Packaging (Android (All)):  [proguard]          '-dontskipnonpubliclibraryclassmembers'.
MainFrameActions: Packaging (Android (All)): BUILD FAILED
MainFrameActions: Packaging (Android (All)): C:\NVPACK\android-sdk-windows\tools\ant\build.xml:871: Please correct the above warnings first.
MainFrameActions: Packaging (Android (All)): Total time: 19 seconds
MainFrameActions: Packaging (Android (All)): BuildCommand.Execute: ERROR: BUILD FAILED
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: AutomationTool terminated with exception:
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: Exception in UnrealBuildTool: ERROR: cmd.exe failed with args /c "C:\NVPACK\apache-ant-1.8.2/bin/ant.bat" -quiet release
MainFrameActions: Packaging (Android (All)): Stacktrace:    at UnrealBuildTool.Android.UEDeployAndroid.RunCommandLineProgramAndThrowOnError(String WorkingDire
MainFrameActions: Packaging (Android (All)): ctory, String Command, String Params, String OverrideDesc, Boolean bUseShellExecute)
MainFrameActions: Packaging (Android (All)):    at UnrealBuildTool.Android.UEDeployAndroid.MakeApk(String ProjectName, String ProjectDirectory, String OutputPath, String EngineDirectory, Boolean bForDistribution, String CookFlavor, Boolean bMakeSeparateApks, Boolean bIncrementalPackage)
MainFrameActions: Packaging (Android (All)):    at UnrealBuildTool.Android.UEDeployAndroid.PrepForUATPackageOrDeploy(String ProjectName, String ProjectDirectory, String ExecutablePath, String EngineDirectory, Boolean bForDistribution, String CookFlavor)
MainFrameActions: Packaging (Android (All)):    at AndroidPlatform.Package(ProjectParams Params, DeploymentContext SC, Int32 WorkingCL)
MainFrameActions: Packaging (Android (All)):    at Project.Package(ProjectParams Params, Int32 WorkingCL)
MainFrameActions: Packaging (Android (All)):    at BuildCookRun.DoBuildCookRun(ProjectParams Params)
MainFrameActions: Packaging (Android (All)):    at BuildCommand.Execute()
MainFrameActions: Packaging (Android (All)):    at AutomationTool.Automation.Execute(List`1 CommandsToExecute, CaselessDictionary`1 Commands)
MainFrameActions: Packaging (Android (All)):    at AutomationTool.Automation.Process(String[] CommandLine)
MainFrameActions: Packaging (Android (All)):    at AutomationTool.Program.MainProc(Object Param)
MainFrameActions: Packaging (Android (All)):    at AutomationTool.InternalUtils.RunSingleInstance(MainProc Main, Object Param)
MainFrameActions: Packaging (Android (All)):    at AutomationTool.Program.Main()
MainFrameActions: Packaging (Android (All)): Program.Main: ERROR: ERROR: cmd.exe failed with args /c "C:\NVPACK\apache-ant-1.8.2/bin/ant.bat" -quiet release
MainFrameActions: Packaging (Android (All)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (All)): Program.Main: AutomationTool exiting with ExitCode=1
MainFrameActions: Packaging (Android (All)): Domain_ProcessExit
MainFrameActions: Packaging (Android (All)): ProcessManager.KillAll: Trying to kill 0 spawned processes.
MainFrameActions: Packaging (Android (All)): copying UAT log files...
MainFrameActions: Packaging (Android (All)): RunUAT.bat ERROR: AutomationTool was unable to run successfully.
MainFrameActions: Packaging (Android (All)): BUILD FAILED

Hi AZZATRU,

Firstly, you will want to change your SDK API from ‘android-15’ to ‘android-19’.

From what I can see in your logs snippet, the relevant error is this:

ERROR: cmd.exe failed with args /c “C:\NVPACK\apache-ant-1.8.2/bin/ant.bat” -quiet release

This is a very generic error and could be caused by many things. I do see some Proguard errors in your logs. Here is a thread with many suggestions of what could cause that error message, be sure to check the proguard section specifically.

Hi,

I have followed your steps yet still get the error. Any ideas? (it stems from the Proguard I think)

Thanks