构建工具----gradle---可能遇到的问题----Could not reserve enough space for object heap
2017-01-24 18:08
1991 查看
Could not reserve enough space for object heap
意思是 jvm的设置内存不足以运行gradle命令了。
分为两种情况,解决的方法也不同。
Error: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/2.10/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.
![](http://img.blog.csdn.net/20170124180148874?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenpxOTAwNTAz/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
解决方法:
1 定位到目录 C:\Users\<username>\.gradle 例如我这里是C:\Users\zoe\.gradle
2 创建文件gradle.properties 内容:org.gradle.jvmargs=-Xmx512m
再执行命令发现不再报错了,运行成功。
![](http://img.blog.csdn.net/20170124180337862?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenpxOTAwNTAz/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
![](http://img.blog.csdn.net/20170124180347752?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvenpxOTAwNTAz/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center)
如图 找到 gradle的arguments设置jvm大小 为-Xmx512m
意思是 jvm的设置内存不足以运行gradle命令了。
分为两种情况,解决的方法也不同。
cmd命令行中使用gradle的错误
在命令行中使用gradle命令时可能会报如下错误:Error: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/2.10/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.
解决方法:
1 定位到目录 C:\Users\<username>\.gradle 例如我这里是C:\Users\zoe\.gradle
2 创建文件gradle.properties 内容:org.gradle.jvmargs=-Xmx512m
再执行命令发现不再报错了,运行成功。
myeclipse或者Android Studio中使用gradle报错
这种情况如果使用情况一中的解决方式不能解决的话,可以尝试设置IDE中的内存配置。如图 找到 gradle的arguments设置jvm大小 为-Xmx512m
相关文章推荐
- 构建工具----gradle---可能遇到的问题----Could not reserve enough space for object heap
- Android Studio Gradle Could not reserve enough space for object heap
- Android Studio Gradle Could not reserve enough space for object heap.
- 问题3-Error occurred during initialization of VM Could not reserve enough space for object heap
- Could not reserve enough space for object heap 问题解决
- Gradle 报内存不够错误 Could not reserve enough space for object heap
- android应用构建- Could not reserve enough space for object heap
- Android Studio Gradle Could not reserve enough space for object heap
- 关于Myeclipse下的JVM启动异常的问题:Out Of Memery / Could not reserve enough space for object heap
- fisheye Error occurred during initialization of VM Could not reserve enough space for object heap 问题解决!
- Android Studio Gradle Could not reserve enough space for object heap
- [解决方案]Android Studio Gradle Could not reserve enough space for object heap
- Error:Unable to start the daemon process: could not reserve enough space for object heap.
- Error occurred during initialization of VM Could not reserve enough space for object heap
- Could not reserve enough space for object heap解决办法
- crontab 中ssh远程启动java程序报错 Could not reserve enough space for object heap
- unable to start the daemon process:could not reserve enough space for object heap.
- “Could not reserve enough space for object heap“
- android Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine.
- hadoop提示Could not reserve enough space for object heap