If you are looking for help, please confirm the following...
Which mobile framework are you using?Flutter (Dart) Steps to reproduceEnvironment
Steps to reproduce
Expected results
Actual results
Notes
Build id (optional)6aa416da63758923bfadb401 |
Replies: 2 comments 2 replies
|
Hello @laboeni 👋 The Your android/gradle.properties contains org.gradle.jvmargs=-Xmx8G, but Gradle also loads properties from the Gradle user home (~/.gradle/gradle.properties). Since the build machine currently has org.gradle.jvmargs= defined there, that value takes precedence over the project-level setting. As a result, the -Xmx8G from your project isn't being used. As a workaround, you can set the following environment variable in your Codemagic environment variables: This will force the JVM heap size to 4 GB and should resolve the R8
Let me know how it goes. Btw you can also read more about the JavaHeapSpace issue in the blog post here--> https://blog.codemagic.io/java-heap-space-error-and-how-codemagic-helps-to-remediate-it/ |
|
Hi, thanks for confirming the cause. We'll set
Request: please document this in "Common Android issues" and answer discussions #2427 and Thanks. |

Hello @laboeni 👋
Thanks for the detailed follow-up.
Regarding the timeline: the empty org.gradle.jvmargs= entry in ~/.gradle/gradle.properties is not something that was introduced around September 11.. it has been part of the build environment forever. Nothing was deployed between September 4 and September 11 that would cause your issue.
What likely changed is the amount of memory available to the JVM during a particular build. The build is running on shared infrastructure, so the resources available to a particular build can vary. In your case, the JVM isn't receiving the project's -Xmx8G setting because the empty org.gradle.jvmargs= in the Gradle user-home properties takes precedence. I…