Error java.lang.OutOfMemoryError: GC overhead limit exceeded

后端 未结 20 2812
攒了一身酷
攒了一身酷 2020-11-21 05:23

I get this error message as I execute my JUnit tests:

java.lang.OutOfMemoryError: GC overhead limit exceeded

I know what an OutOfMemo

20条回答
  •  日久生厌
    2020-11-21 05:35

    You can also increase memory allocation and heap size by adding this to your gradle.properties file:

    org.gradle.jvmargs=-Xmx2048M -XX\:MaxHeapSize\=32g

    It doesn't have to be 2048M and 32g, make it as big as you want.

提交回复
热议问题