Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/366.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Java Eclipse Gradle STS扩展:无法为对象堆保留足够的空间_Java_Eclipse_Jvm_Gradle_Sts Springsourcetoolsuite - Fatal编程技术网

Java Eclipse Gradle STS扩展:无法为对象堆保留足够的空间

Java Eclipse Gradle STS扩展:无法为对象堆保留足够的空间,java,eclipse,jvm,gradle,sts-springsourcetoolsuite,Java,Eclipse,Jvm,Gradle,Sts Springsourcetoolsuite,偶尔当Gradle STS扩展在安装了Gradle STS扩展的情况下启动Eclipse 3.7(Indigo)后尝试执行我的项目的Gradle构建脚本时,我会遇到以下错误: Unable to start the daemon process. The exit value was: 1. This problem might be caused by incorrect configuration of the daemon. For example, an unrecognized jvm

偶尔当Gradle STS扩展在安装了Gradle STS扩展的情况下启动Eclipse 3.7(Indigo)后尝试执行我的项目的Gradle构建脚本时,我会遇到以下错误:

Unable to start the daemon process. The exit value was: 1.
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/current/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
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.

Could not fetch model of type 'EclipseProject' using Gradle distribution 'http://services.gradle.org/distributions/gradle-1.0-bin.zip'.
以下是我的系统规格:

  • Windows 7 32位
  • Eclipse3.7 32位
  • Java jdk1.7.0_07 32位

这是这个插件的已知错误吗?有没有关于如何修复它的想法?

听起来好像偶尔有一次,您的系统无法保留足够的内存来启动Gradle守护进程。项目是否有包含内存设置的
gradle.properties
org.gradle.jvmargs
)?或者,在~/.gradle中是否有
gradle.properties

我在导入gradle项目时遇到了相同的问题。(Windows 7 64位,sts-3.2.0.RELEASE 32位,Java jdk1.7.0_13 32位)


解决了在项目目录(=sts workspace)中创建gradle.properties文件的问题,该文件的内容为:org.gradle.jvmargs=-Xms128m-Xmx512m



请注意,-Xmx=512m是我可以在系统上使用的最大JVM内存大小。较大的Xmx内存大小会导致所描述的错误。

在eclipse中,转到窗口、首选项、渐变、参数 并在对话框中添加渐变jvmargs-Xms128m-Xmx512m


尝试将
gradle.properties
文件放入项目目录,并通过
org.gradle.jvmargs
设置标准Java内存选项,例如
org.gradle.jvmargs=-Xms128m-Xmx256m
。可能是您的系统有时内存不足吗?请注意Intellij IDEA用户:如果您尝试在JetGradle窗口中“刷新”gradle项目,这也解决了Intellij IDEA 12.1.6中几乎完全相同的问题。还请注意,在某些情况下,
GRADLE\u OPTS
环境变量设置为
-Xmx512m
会有所帮助(例如,如果没有它,我无法将我的GRADLE项目导入Intellij IDEA),但无论如何,我必须在
GRADLE.properties
中设置
org.GRADLE.jvmargs=-Xms128m-Xmx256m
。我的设置是:Windows 7 64位,JDK1.7.01732位,Gradle 1.8。这解决了我的STS问题!我已经为此工作了一整天了!谢谢你,伙计!