如何将多个Gradle项目添加到同一个IntelliJ实例中

时间:2015-09-17 04:38:43

标签: java intellij-idea gradle intellij-12

当我尝试将其他项目作为模块导入同一个IntelliJ实例时,我得到以下异常。我使用IntelliJ IDEA 12.1.4

Could not fetch model of type 'BasicIdeaProject' using Gradle installation 'C:\Program Files\gradle-1.6'.
Unable to start the daemon process.
This problem might be caused by incorrect configuration of the daemon.
For example, an unrecognized jvm option is used.
Please refer to the user guide chapter on the daemon at http://gradle.org/docs/1.6/userguide/gradle_daemon.html
Please read below process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.


Consult IDE log for more details (Help | Reveal Log)

我觉得我需要在某处更改JVM参数,但不确定确切位置。

1 个答案:

答案 0 :(得分:0)

我将以下行添加到gradle.properties

中的C:\Users\username\.gradle文件中
org.gradle.jvmargs=-Xms128m -Xmx256m

上面没有给我错误,并将项目添加为魅力。但它仍然删除现有项目并添加新项目。所以每个实例仍然有一个项目。 :(