I am using android studio 1.0 RC
for 64 bit linux.
When I run my application I am getting
"java.lang.OutOfMemoryError: GC overhead limit exceeded"
When I searched on how to solve this error I got solutions like add:
These did not work for me.
Please help. Thanks in advance
GC Overhead Limit Exceeded ErrorIt's thrown by the JVM when it encounters a problem related to utilizing resources. More specifically, the error occurs when the JVM spent too much time performing Garbage Collection and was only able to reclaim very little heap space.
Open the Job in Studio, and navigate to the Advanced > Run tab below the designer view. Click the plus [+] sign next to the JVM parameters window, and a dialog will open where you can add the -XX:-UseGCOverheadLimit flag.
I solved this issue by adding
dexOptions { incremental true javaMaxHeapSize "4g" }
to the android closure in build.gradle file. Found this answer in
OutOfMemoryError: GC overhead limit exceeded
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With