#  ERROR: cmd.exe failed with args - This is AGONY

**URL:** <https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-this-is-agony/260724>\
**Category:** Mobile\
**Tags:** unreal-engine, Android\
**Created:** [November 13, 2021, 2:22pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-this-is-agony/260724 "2021-11-13T14:22:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CooPleys](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@CooPleys](https://forums.unrealengine.com/u/CooPleys)\
**Post date:** [November 13, 2021, 2:22pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-this-is-agony/260724/1 "2021-11-13T14:22:24Z")

</div>

Please someone help… I’m struggling with this from a week now! When I try to “Launch” my mobile game on my phone! Android! It gives me this error! I am on engine version 4.26.2!

LogPlayLevel: Error: ERROR: cmd.exe failed with args /c “E:\AAAUE4\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDeb

Log:

FAILURE: Build failed with an exception.  
LogPlayLevel: \* What went wrong:  
LogPlayLevel: Could not initialize class org.codehaus.groovy.reflection.ReflectionCache  
LogPlayLevel: \* Try:  
LogPlayLevel: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.  
LogPlayLevel: \* Get more help at [https://help.gradle.org](https://help.gradle.org)  
LogPlayLevel: BUILD FAILED in 3s  
LogPlayLevel: Error: ERROR: cmd.exe failed with args /c “E:\AAAUE4\Intermediate\Android\armv7\gradle\rungradle.bat” :app:assembleDebug  
LogPlayLevel: Took 83.4708026s to run UnrealBuildTool.exe, ExitCode=6  
LogPlayLevel: UnrealBuildTool failed. See log for more details. (C:\Users\ivan\_\AppData\Roaming\Unreal Engine\AutomationTool\Logs\E+AAAUE4+UE4ACTUALLY+UE\_4.26\UBT–Android-Development.txt)  
LogPlayLevel: AutomationTool exiting with ExitCode=6 (6)  
LogPlayLevel: Completed Launch On Stage: Build Task, Time: 82.848633  
LogPlayLevel: BUILD FAILED  
PackagingResults: Error: Launch failed! Unknown Error

Someone PLEASE PLEASE PLEASE help! This is AGONY! ANY SOLUTIONS… PLEASE!

---

<div class="post-metadata">

**Author:** ![Hawk\_Apoorv](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Hawk\_Apoorv](https://forums.unrealengine.com/u/Hawk_Apoorv)\
**Post date:** [November 13, 2021, 9:06pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-this-is-agony/260724/2 "2021-11-13T21:06:55Z")

</div>

did you solved this error?  
Am also getting this error

---

<div class="post-metadata">

**Author:** ![holoruss](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/holoruss/32/465513_2.png) [@holoruss](https://forums.unrealengine.com/u/holoruss)\
**Post date:** [March 23, 2022, 11:22pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-this-is-agony/260724/3 "2022-03-23T23:22:48Z")

</div>

I thought I would add a bit here that hopefully helps. There could be a number of reason why you are getting this error. Read through your logs before and see if it gives a clue. Some just needed to delete their Intermediate folder and it worked. Many had to go back through their Android Studio setup and make changes.

A way to isolate the problem (if say removing the Intermediate folder does not work) Would be to build a totally blank project with a basic level that works with your headset. Then try to package and/ or launch the project to your headset. If this works, then you have isolated the problem to some extent and will not have to look towards rebuilding or re- installing Android Studio and dealing with settings. From there, it could be something within your current project, asset or setting other than anything regarding Android Studio that is causing the problem. Hope this helps, sometimes you have to troubleshoot what does work and go from there,
