2

This is the gradle log

e: [kapt] An exception occurred: java.lang.OutOfMemoryError: GC overhead limit exceeded

e: /Users/mladenrakonjac/MyFirstKotlinApp/app/src/main/java/me/mnemonic/myloan/data/AppDatabase.kt: (1, 1): Some error(s) occurred while processing annotations. Please see the error messages above.

How do I fix the error java.lang.OutOfMemoryError: GC overhead limit exceeded?

Mibac
  • 8,990
  • 5
  • 33
  • 57
Mladen Rakonjac
  • 9,562
  • 7
  • 42
  • 55
  • refer https://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded – sasikumar Jul 05 '17 at 05:01
  • Possible duplicate of [Error java.lang.OutOfMemoryError: GC overhead limit exceeded](https://stackoverflow.com/questions/1393486/error-java-lang-outofmemoryerror-gc-overhead-limit-exceeded) – guenhter Jul 05 '17 at 05:18
  • I am also facing the exact same problem. I have tried everything provided in the referral links but nothing has worked out for me. Issue is, I am using databinding and problem seems to be while generating files by Kotlin compiler. Have you solved this problem @Mladen – Sandip Oct 04 '18 at 06:22
  • @sandip I cannot recall, it was time ago. :/ – Mladen Rakonjac Oct 04 '18 at 07:22

1 Answers1

0

This goes in your gradle.properties file as the value for the org.gradle.jvargs parameter, e.g.

org.gradle.jvmargs=-Xms2560m -Xmx4096m -XX:MaxPermSize=350m -XX:ReservedCodeCacheSize=225m -XX:+UseCompressedOops
amram99
  • 699
  • 8
  • 19
Daniel Pína
  • 348
  • 2
  • 7