Bitrise Build Error: 'R8: java.lang.OutOfMemory' and 'Gradle Daemon Disappered'

Following an update of the Android Gradle distribution url version from 8.2 to 8.4, the ‘android-build@1’ step in our bitrise workflow encountering an 'R8: java.lang.OutOfMemory: GC overload limit exceeds’ error.
Increasing max heap size using org.gradle.jvmargs’ within ‘’ resolves above error but different problem arises - the ‘Gradle build daemon disappeared unexpectedly (it may have been killed or may have crashed)’.
Notably, this occurs exclusively within the Bitrise Job, while local builds proceed without issue.
What potential solutions or recommendations can you provide to address this challenges in bitrise environment?

1 Like

Hey @londhep,

If it’s still happening please reach out to support and we will take a look at your build.