We are working on a project which includes lot of new code being developed in terms of multiple sdk's (Being developed in-house) and when we started integrating the new code changes coming along with the sdk's developed by the teams we are getting below error:
minifyReleaseWithR8
WARNING:: R8: Missing class: org.conscrypt.ConscryptHostnameVerifier
WARNING:: R8: Missing class: com.bun.miitmdid.interfaces.IIdentifierListener
ERROR:: R8: java.lang.OutOfMemoryError: GC overhead limit exceeded
The thing to be noted is this is happening while creating build from our CI pipeline and works perfectly on our local machines. Have visited multiple posts mentioning the changes to be done in jvm memory options. Below are the properties we have defined in "gradle.properties" and "build.gradle".
Gradle daemon config
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
android.useAndroidX=true
android.enableJetifier=true
We have tried all the combinations by increasing and decreasing the values for "org.gradle.jvmargs" and "MaxPermSize" but no success.
android {
//Other configs
dexOptions {
javaMaxHeapSize "4g"
}
}
We have even tried increasing the CI runner configration from 8GB RAM to 16GB RAM (4core) but still no success.