# ERROR: cmd.exe failed with args /c "E:\\\\Intermediate\\Android\\gradle\\rungradle.bat" :app:bundleRelease

**URL:** <https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703>\
**Category:** Mobile\
**Tags:** unreal-engine, Android, question, UE4-27\
**Created:** [May 6, 2022, 6:13pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703 "2022-05-06T18:13:28Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![salimgulesen](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@salimgulesen](https://forums.unrealengine.com/u/salimgulesen)\
**Post date:** [May 13, 2022, 5:34pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/23 "2022-05-13T17:34:47Z")

</div>

Thank you very much my friend. I got the happy ending. It was a job and I got paid. You’ve made me very happy. I will not be in the environment for 6 months to do military service. but I want to do something for you after you come back.

[image]

---

<div class="post-metadata">

**Author:** ![dev.ue.games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dev.ue.games/32/466816_2.png) [@dev.ue.games](https://forums.unrealengine.com/u/dev.ue.games)\
**Post date:** [May 13, 2022, 7:30pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/25 "2022-05-13T19:30:15Z")

</div>

for publication in the playmarket you will need a file aab …

---

<div class="post-metadata">

**Author:** ![dev.ue.games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dev.ue.games/32/466816_2.png) [@dev.ue.games](https://forums.unrealengine.com/u/dev.ue.games)\
**Post date:** [May 13, 2022, 7:33pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/26 "2022-05-13T19:33:42Z")

</div>

ideally the engine should pack the aab file without errors … so if you pack the apk file without problems … but aab has an error then the problem still exists

---

<div class="post-metadata">

**Author:** ![Jhoven25](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Jhoven25](https://forums.unrealengine.com/u/Jhoven25)\
**Post date:** [May 14, 2022, 1:25pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/27 "2022-05-14T13:25:30Z")

</div>

Hello sir/ma’am, I have the same problem but “steam vr” nor unchecking aab didn’t solve the problem. Is there any way to fix it? thak you in advance.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/0/8/908748661e9f4f5a1dbb58dd3dcf6f915be0d571.jpeg)n

---

<div class="post-metadata">

**Author:** ![dev.ue.games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dev.ue.games/32/466816_2.png) [@dev.ue.games](https://forums.unrealengine.com/u/dev.ue.games)\
**Post date:** [May 14, 2022, 2:06pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/28 "2022-05-14T14:06:45Z")

</div>

this is the version (ue4.25-27) of the engine in which I work and have a little experience))

 ![Screenshot_184](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/b/a/cba0908c0c6a18da31b25be3e170de5c7fafc7a3.png)  
better create a new post with the question ue5 android) and who works on ue5 will help you

---

<div class="post-metadata">

**Author:** ![shiki\_2019](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shiki_2019/32/546483_2.png) [@shiki\_2019](https://forums.unrealengine.com/u/shiki_2019)\
**Post date:** [June 10, 2022, 5:25pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/29 "2022-06-10T17:25:07Z")

</div>

I meet the same problem. but my setting is same with you.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/3/3/5336b99f12ac8ac97498c6297fa667221be6c623.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/f/a/dfaa682b0e1808d5d435abf596cc830349eca0bc.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/7/9/b79615e900dba7617afab5c7edbddcd16f8a9d5d.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/9/7/c/97c3035ef81ac4e74065d2eb9156461cc00861c7.png)

I almost crazy!!! 😭

---

<div class="post-metadata">

**Author:** ![dev.ue.games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dev.ue.games/32/466816_2.png) [@dev.ue.games](https://forums.unrealengine.com/u/dev.ue.games)\
**Post date:** [June 10, 2022, 11:26pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/30 "2022-06-10T23:26:30Z")

</div>

> [@shiki\_2019](#):
>
> but my setting is same with you.

no) this my setting  
[https://forums.unrealengine.com/t/pack-a-game-for-android-without-installing-android-studio-update-android-12/492029](https://forums.unrealengine.com/t/pack-a-game-for-android-without-installing-android-studio-update-android-12/492029)

---

<div class="post-metadata">

**Author:** ![shiki\_2019](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shiki_2019/32/546483_2.png) [@shiki\_2019](https://forums.unrealengine.com/u/shiki_2019)\
**Post date:** [June 11, 2022, 1:58am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/31 "2022-06-11T01:58:29Z")

</div>

![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/a/e/5aecb3f78ef9ecb3bff146f51fd30159101e1518.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/6/8/1/68140b44575930ce8b9039efacd897659b69d7e9.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/7/d677cebf65b805b03e68a3554805f9cb7dacd3f3.png)  
The SDK and NDK settings i followed a Youtube video.he package succeed.

---

<div class="post-metadata">

**Author:** ![shiki\_2019](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/shiki_2019/32/546483_2.png) [@shiki\_2019](https://forums.unrealengine.com/u/shiki_2019)\
**Post date:** [June 11, 2022, 3:37am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/32 "2022-06-11T03:37:42Z")

</div>

I succeed. Dont use Android API 33. Don’t check in Android Studio SDK manager.

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/1/1/8/1184cda73f49b27c0141552f4e666f36817f2627.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/4/b14ff8b773f07bc58a1fb9b460fdc27ccb0402a5.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/2/2/b22e049a7694446f25e196f1f63575a1c69425d9.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/8/588c0d093234baefec017c3483d2aba1106312b3.png)

i think the ERROR: cmd.exe failed with args /c “X:XXXXXXX\Android\gradle\rungradle.bat” :app:bundleRelease is related to Android API 33.  
Before now ,in order to packag apk with UE4.27, i clean the Android Environment. This resulted in me not being able to package in Unity. Unity can only use NDK r19,but UE4.27 can only use NDK r21.

---

<div class="post-metadata">

**Author:** ![ArthurK](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arthurk/32/947831_2.png) [@ArthurK](https://forums.unrealengine.com/u/ArthurK)\
**Post date:** [September 20, 2022, 9:41am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/33 "2022-09-20T09:41:58Z")

</div>

I have the same problem. How to fix the aab problem? I need to publish in the market, so i must build a file aab.

This is my Mac environment:  
UE4.26  
AndroidSDK 30  
NDK 21  
r21e  
java version “18.0.2.1” 2022-08-18  
Java™ SE Runtime Environment (build 18.0.2.1+1-1)  
Java HotSpot™ 64-Bit Server VM (build 18.0.2.1+1-1, mixed mode, sharing)

---

<div class="post-metadata">

**Author:** ![dev.ue.games](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/dev.ue.games/32/466816_2.png) [@dev.ue.games](https://forums.unrealengine.com/u/dev.ue.games)\
**Post date:** [September 29, 2022, 12:05am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/34 "2022-09-29T00:05:19Z")

</div>

> [@ArthurK](#):
>
> java version “18.0.2.1” 2022-08-18

why this version? It’s not the first time I see… where did you read that it is version Java needed)?

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/c/0/8c0efecc0d5ab0a14255cb37e73dfbedfa4ae566.png)

---

<div class="post-metadata">

**Author:** ![Anaraki99](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Anaraki99](https://forums.unrealengine.com/u/Anaraki99)\
**Post date:** [February 21, 2023, 1:26pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/35 "2023-02-21T13:26:13Z")

</div>

Hi I get the same problem.

I tried all different ways stated in this tread and I followed the instructions of the unreal documentation

I get message

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/1/8/b1897600be8ddc8c9d2340e8bbfc4b1cfc1fafc8.png)

I´m using SDK

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/a/c8a9400e2e607fc6d47f729a0c933af24c401aae.png)

And NDK

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/6/c/d6cac4d139dea9949c482b28f82cb45b0ff93ef6.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/3/f/c/3fc85674151f40bf39d50d874e6fff7b9d7dee4f.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/b/c/e/bcec5ca8a96640a10b19e3a0db38dd4df91ebe83.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/8/e/0/8e03ffc423ae4059f8e85def1e60b626c6e0c1b2.png)

Settings:

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/5/8/4/58465fe1dceaabd2ffe680ad0ecddd1e761803d9.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/d/3/7/d37bf959a8772db4fd54043e0c9bf63e32a350c6.png)  
 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/3/3/e3396c267d69978e4487513ed004cb374451a18c.png)

Anyone can that can help?

---

<div class="post-metadata">

**Author:** ![AnaWilliam850](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@AnaWilliam850](https://forums.unrealengine.com/u/AnaWilliam850)\
**Post date:** [February 21, 2023, 5:21pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/36 "2023-02-21T17:21:43Z")

</div>

> [@salimgulesen](#):
>
> I’ve been getting the same error for days, there’s nothing I haven’t done. I don’t know what to do anymore. Please help. I got paid for this project and I only have experience on pc. I don’t understand the errors in apk extensions. Thank you to everyone who will help. The error is as I wrote below.  
> Task :permission\_library:mergeReleaseJniLibFolders  
> UATHelper: Packaging (Android (ETC2)): \> Task :app:validateSigningRelease  
> UATHelper: Packaging (Android (ETC2)): \> Task :downloader\_library:mergeReleaseNativeLibs  
> UATHelper: Packaging (Android (ETC2)): \> Task :downloader\_library:stripReleaseDebugSymbols NO-SOURCE  
> UATHelper: Packaging (Android (ETC2)): \> Task :downloader\_library:copyReleaseJniLibsProjectOnly  
> UATHelper: Packaging (Android (ETC2)): \> Task :app:parseReleaseIntegrityConfig  
> UATHelper: Packaging (Android (ETC2)): \> Task :permission\_library:mergeReleaseNativeLibs  
> UATHelper: Packaging (Android (ETC2)): \> Task :permission\_library:stripReleaseDebugSymbols NO-SOURCE  
> UATHelper: Packaging (Android (ETC2)): \> Task :permission\_library:copyReleaseJniLibsProjectOnly  
> UATHelper: Packaging (Android (ETC2)): \> Task :app:mergeReleaseNativeLibs  
> UATHelper: Packaging (Android (ETC2)): \> Task :app:stripReleaseDebugSymbols  
> UATHelper: Packaging (Android (ETC2)): \> Task :app:buildReleasePreBundle FAILED  
> UATHelper: Packaging (Android (ETC2)): FAILURE: Build failed with an exception.  
> UATHelper: Packaging (Android (ETC2)): \* What went wrong:  
> UATHelper: Packaging (Android (ETC2)): Execution failed for task ‘:app:buildReleasePreBundle’.  
> UATHelper: Packaging (Android (ETC2)): \> Required array size too large  
> UATHelper: Packaging (Android (ETC2)): \* Try:  
> UATHelper: Packaging (Android (ETC2)): 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.  
> UATHelper: Packaging (Android (ETC2)): \* Get more help at [https://help.gradle.org](https://help.gradle.org)  
> UATHelper: Packaging (Android (ETC2)): 62 actionable tasks: 62 executed  
> UATHelper: Packaging (Android (ETC2)): BU�LD FAILED in 2m 13s  
> UATHelper: Packaging (Android (ETC2)): ERROR: cmd.exe failed with args /c “E:\selcuklumacerasiapk\Intermediate\Android\gradle\rungradle.bat” :app:bundleRelease  
> UATHelper: Packaging (Android (ETC2)): (see C:\Users\super\AppData\Roaming\Unreal Engine\AutomationTool\Logs\C+Program+Files+Epic+Games+UE\_4.27\Log.txt for full exception trace)  
> UATHelper: Packaging (Android (ETC2)): AutomationTool exiting with ExitCode=1 (Error\_Unknown)  
> UATHelper: Packaging (Android (ETC2)): BUILD FAILED  
> PackagingResults: Error: Unknown Error  
> LogAudioMixer: Warning: Changing default audio render device to new device: {0.0.0.00000000}.{b45432ad-a8e2-4a28-beaa-1f7b2aaa75e7}.  
> LogAudioMixer: Resetting audio stream to device id  
> LogAudioMixer: Display: 0: FrontLeft  
> LogAudioMixer: Display: 1: FrontRight  
> [image]

Based on the error message you provided, it seems that the build process for your Android app is failing due to an “array size too large” error. This could be caused by a variety of factors, such as a memory issue, an issue with the Gradle build system, or an issue with the app code itself.

Here are a few things you could try to troubleshoot the issue:

1. Check your build configuration: Make sure that your build configuration is set up correctly and that you are using the appropriate version of Gradle. You can also try increasing the heap size of the Gradle daemon by adding the following line to your `gradle.properties` file: `org.gradle.jvmargs=-Xmx4096m`
2. Review your code: If you have made any recent changes to your app code, review them carefully to see if there are any arrays or data structures that could be causing the issue. Make sure that you are not exceeding any limits on array size or memory usage.
3. Check your hardware: It’s possible that the issue could be related to your computer’s hardware. Make sure that you have enough free memory and disk space, and that your CPU is not being overwhelmed by other processes.
4. Consult the Gradle documentation: If none of the above steps solve the issue, consult the Gradle documentation or seek help from the Gradle community to see if there are any known issues or solutions related to “array size too large” errors.

I hope these suggestions help you resolve the issue and successfully build your Android app. Good luck!

---

<div class="post-metadata">

**Author:** ![dathtp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dathtp](https://forums.unrealengine.com/u/dathtp)\
**Post date:** [May 13, 2023, 2:47am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/37 "2023-05-13T02:47:02Z")

</div>

But the gradle.properties files in my project folder will reset org.gradle.jvmargs value after I rebuild my project.

---

<div class="post-metadata">

**Author:** ![dathtp](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dathtp](https://forums.unrealengine.com/u/dathtp)\
**Post date:** [May 14, 2023, 12:31am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/38 "2023-05-14T00:31:43Z")

</div>

I fixed the issue, it happen after upgrade to 5.2. I just fallback to 5.1.1

---

<div class="post-metadata">

**Author:** ![ArthasLionheart](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/arthaslionheart/32/484903_2.png) [@ArthasLionheart](https://forums.unrealengine.com/u/ArthasLionheart)\
**Post date:** [October 7, 2023, 2:31am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/39 "2023-10-07T02:31:37Z")

</div>

I’m almost killing myself with the same error…

---

<div class="post-metadata">

**Author:** ![Drackous](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Drackous](https://forums.unrealengine.com/u/Drackous)\
**Post date:** [October 21, 2023, 8:26am UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/40 "2023-10-21T08:26:26Z")

</div>

Exactly! Do we have any solution to that?

---

<div class="post-metadata">

**Author:** ![KawinkaDerek](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@KawinkaDerek](https://forums.unrealengine.com/u/KawinkaDerek)\
**Post date:** [April 3, 2024, 2:56pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/41 "2024-04-03T14:56:28Z")

</div>

@dev.ue.games i have the same problem

 ![image](https://d3kjluh73b9h9o.cloudfront.net/original/4X/e/c/a/eca49c596f8692500e61f21008a4fe698da52ec2.png)

---

<div class="post-metadata">

**Author:** ![dj\_senator](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dj\_senator](https://forums.unrealengine.com/u/dj_senator)\
**Post date:** [May 4, 2024, 8:27pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/42 "2024-05-04T20:27:46Z")

</div>

help, I have such an error

Intermediate\Android\gradle\rungradle.bat" :app:bundleRelease

---

<div class="post-metadata">

**Author:** ![Online\_Learner\_Amh5k](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Online\_Learner\_Amh5k](https://forums.unrealengine.com/u/Online_Learner_Amh5k)\
**Post date:** [May 9, 2024, 2:56pm UTC](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703/43 "2024-05-09T14:56:25Z")

</div>

JDK：…Android Studio/jre

[Previous page](https://forums.unrealengine.com/t/error-cmd-exe-failed-with-args-c-e-intermediate-android-gradle-rungradle-bat-bundlerelease/550703.md?page=1)
