trying to build a release apk but getting java.lang.OutOfMemoryError: GC overhead limit exceeded exception

299 Views Asked by At

Problem : Getting outofmemory error while generating the release apk. error related to "app:transformClassesAndResourcesWithR8ForRelease" "org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':app:transformClassesAndResourcesWithR8ForRelease'"

Solution : Out of memory: Java heap space. Please assign more memory to Gradle in the project's gradle.properties file. For example, the following line, in the gradle.properties file, sets the maximum Java heap size to 1,024 MB: org.gradle.jvmargs=-Xmx1024m

Above Solution is working. But is there any efficient way to solve above problem?

0

There are 0 best solutions below