ERROR: cmd.exe failed with args

True
That t

Jdk 15? Ill TRY IT!

Doing This Right Now, Although Idk If The Android.bat Did Anything But Im Using Android Studio To Open SDK Managed And It Download It Automatically To The C:\NVPACK\android-sdk-windows Folder

OMG ITS A MIRACLE! IT WORKED IT WORKED!!!
I Just Used The Sdk Manager Then Picked All Versions From 18 To 30 Then It Installed At The android-sdk-windows (NVPACK) Location Then It Just Built Like It Was Nothing, AWESOME! Thank You So Much, I Felt This Was The Issue But Didn’t Know How To Tackle IT! Awesome Dude! I Can Finally Test My Game BRU!

1 Like

That error is caused by the exception thrown ahead, and mine is
“Build-tool 31.0.0 rc5 is missing DX at C:\NVPACK\android-sdk-windows\build-tools\31.0.0-rc5\dx.bat”

I remove all versions of SDK Build Tool, and installed the lastest version which did not work.
I finally fixed it by not using the latest verion 31.0.0-rc5 of SDK Build Tool but a little older version 30.0.3.

btw I am using ue 4.26.2.

344966-screenshot-2021-07-28-014119.png

Set Minimum SDK Version Or Target SDK Version

My Error

cmd.exe failed with args

Solved This Type

I’ve managed to fix this error by goingo to build-tools\31.0.0.0\ and renaming the “d8.bat” to “dx.bat” and than going to the “\lib” subfolder on this same directory and renaming the “d8.jar” to “dx.jar”.

It compiled flawlessly!

1 Like

This fixes the problem, but UE4 actually downloads and installs version 29.x and uses that instead, you can verify that in the sdk build tools directory. A better fix is to simply install build tools version 30.0.3 and remove 31.0.0 (pretty easy using android studio sdk manager). Then UE4 uses 30.0.03 instead of failing back to 29.x.

Had This Issue Again, Another Proj, This Time Its A Keystore Password Not Matching The Keystore File, Checking

Keystore Error, Need To Somehow Get The Password Right:

I Used Keystore Explorer To Check If The Password Of My Key Worked With The Key Then Used It In Unreal, Else I Had To Wait Hours Just For An Error,

Error:

Fixed:

Just Follow This Tut To Make The Keys: (You Might Find Them In The System32 Folder In Windows Folder In C:)

With all the suggestions on here, I am sure they all work but I would say try the least destructive first before you go into your Android Studio settings. Simply deleting the Intermediate folder did it for me. Then, if that does not work for you, I would say try the others. Just trying to save a lot of trouble for some.

2 Likes

Hi holoruss!

I’ve been trying almost all of the solutions described on this post, including the fix deleting the intermediate folder. But after i delete it, Unreal regenerates it again, and the export fails once again.

Is there any way to stop Unreal from regenerating the Intermediate folder to make it work?

Unfortunately, it is a necessary feature as the folders repopulate once opened. Since Unreal Engine developers run the gamut, the folder is used for many things and just has to be considered when possible problems occur. At least you can delete it without it messing up your project. About the other reasons for the args problem, most of the solutions on here have worked before but everyone’s setup is slightly different so not sure what the problem may be with your Android Studio setup but appears to come from there. As hard as it may sound, you may want to start with a clean project and troubleshoot from an existing template that you know works and go backwards in troubleshooting the problem. Sorry I wish I had the perfect answer for you. I always hate digging into Android Studio myself and troubleshooting problems but I have had to do it a few times myself, with other issues.

1 Like

Using 4.27.2 - had the same issue with

ERROR: cmd.exe failed with args /c “M:\UNREAL PROJECTS\AR_Project\Intermediate\Android\gradle\rungradle.bat” :app:bundleRelease

d8.bat and jar were set to dx.bat/.jar for every version of the build tools. What worked for me was removing the latest (32.1.0) and in Project Settings/Platforms/Android, setting Target SDK to 30.

i can fix this error send message in facebook page : Code Prof

Problem Fixed here : ERROR: cmd.exe failed with args Unreal Engine | Rungradle.bat Unreal Engine - YouTube