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 :-)
            Asked
            
        
        
            Active
            
        
            Viewed 5,439 times
        
    2
            
            
        - 
                    What are the specifications of your system? – raxerz May 24 '19 at 20:14
 
2 Answers
1
            
            
        Maybe you need to increase heap size. Like said here: https://stackoverflow.com/a/25013822/6041024
dexOptions {
    javaMaxHeapSize "2g"
}
        Robert M.
        
- 94
 - 6
 
- 
                    
 - 
                    
 - 
                    yes i had but it didn't solved the issue, by the way I found how to fix it and I'll post it – Pecana Jun 11 '19 at 06:51
 
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