Getting Gradle error “Could not reserve enough space for object heap” constantly in Intellij IDEA

后端 未结 6 1194
太阳男子
太阳男子 2020-12-01 06:02

So I have a problem with memory allocation. Sometimes it works, and sometimes it doesn\'t. I\'ve read this thread and tried the advice there multiple times. Sometimes

6条回答
  •  日久生厌
    2020-12-01 06:44

    In your android folder there is a gradel.properties file and add the following lines:

    org.gradle.jvmargs=-XX\:MaxHeapSize\=256m -Xmx256m
    

    I ran into this while using Intellij and Flutter. Also another property you may find useful to add is declaring where the JDK is.

    org.gradle.java.home=C:\\Your\\JDK\\path
    

提交回复
热议问题