2

after upgrading to Android Studio 3.4 and also with Anroid 3.4.1 i am facing an error when I try to build APK (normal run works) : Caused by: java.lang.OutOfMemoryError: GC overhead limit exceeded I tried all the suggested changes to gradle-properties withuot success. It soccurs on task app:transformClassesAndResourcesWithR8ForRelease Any help would be appreciated :-)

Zoe
  • 27,060
  • 21
  • 118
  • 148
Pecana
  • 363
  • 5
  • 17

2 Answers2

1

Maybe you need to increase heap size. Like said here: https://stackoverflow.com/a/25013822/6041024

dexOptions {
    javaMaxHeapSize "2g"
}
Robert M.
  • 94
  • 6
0

I finally found a solution which is more easier than every other test / trick :-) I removed the row "org.gradle.jvmargs=" from the gradle.properties in the project folder , but what did the magic was to remove it also from the file (under Windows) C:\Users[YOUR_USERNAME].gradle\gradle.properties

and everything start working as expect and faster than before :-)

Pecana
  • 363
  • 5
  • 17