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

后端 未结 6 1191
太阳男子
太阳男子 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:51

    I got the same error in Visual Studio 2015 with cordova 5.1.1 under Windows 10.

    To solve the issue, set this environment variable:

    _JAVA_OPTIONS=-Xmx512M
    
    1. Right click on start-button and open "System"
    2. Search for "Advanced system settings" and open it
    3. Click the button "Environment Variables ..."
    4. In System Variables, click "New..."
    5. New Variable Name: _JAVA_OPTIONS
    6. New Variable Value: -Xmx512M
    7. Click OK
    8. Restart Visual Studio, so the variable is picked up

    This Article point me in the right direction. I did change the instructions a littel bit, so they fits to Windows 10.

    Hope it helps someone!

提交回复
热议问题