首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >Eclipse Gradle STS扩展:无法为对象堆保留足够的空间

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

Stack Overflow用户
提问于 2012-09-25 22:48:30
回答 3查看 12.4K关注 0票数 18

偶尔当Gradle STS扩展在启动安装了gradle STS扩展的Eclipse3.7 (Indigo)后尝试执行我的项目的Gradle构建脚本时,我会得到以下错误。

代码语言:javascript
复制
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'.

下面是我的系统规格:

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

这是这个插件的已知bug吗?有没有办法解决这个问题?

EN

回答 3

Stack Overflow用户

回答已采纳

发布于 2012-09-25 23:34:24

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

票数 13
EN

Stack Overflow用户

发布于 2013-11-04 18:34:45

在eclipse中,进入Window,Preferences,Gradle,Arguments,在对话框中添加gradle jvmargs -Xms128m -Xmx512m

票数 34
EN

Stack Overflow用户

发布于 2013-07-17 18:00:54

我在导入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内存大小会导致所描述的错误。

票数 5
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/12585506

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档