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

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]

1 Like

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

1 Like

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

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.

n

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


better create a new post with the question ue5 android) and who works on ue5 will help you

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




I almost crazy!!! :sob:

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




The SDK and NDK settings i followed a Youtube video.he package succeed.

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




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.

1 Like

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)

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

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

I´m using SDK

And NDK


image

image

Settings:



Anyone can that can help?

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!

1 Like

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

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

I’m almost killing myself with the same error…

Exactly! Do we have any solution to that?

@dev.ue.games i have the same problem

help, I have such an error

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

JDK:…Android Studio/jre