Could not reserve enough space for 1572864KB object heap

Posted 緈諨の約錠

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Could not reserve enough space for 1572864KB object heap相关的知识,希望对你有一定的参考价值。

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 https://docs.gradle.org/3.3/userguide/gradle_daemon.html
Please read the following process output to find out more:
-----------------------
Error occurred during initialization of VM
Could not reserve enough space for 1572864KB object heap

 


http://www.th7.cn/Program/android/201702/1119428.shtml

Error occurred during initialization of VM Could not reserve enough space for 1572864KB object heap

这意味着JVM没有足够的内存空间。gradle添加以下属性。属性文件将解决你的问题!


解决方案:


1:在个人文件夹( (C:/Users/username/.gradle 或 ~/.gradle))下创建gradle.properties文件,添加


org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m
2:或者直接在Android Studio中gradle.properties文件中添加下面这行,存在则修改


org.gradle.jvmargs=-Xmx512m -XX:MaxPermSize=512m

以上是关于Could not reserve enough space for 1572864KB object heap的主要内容,如果未能解决你的问题,请参考以下文章

Could not reserve enough space for 1572864KB object heap

启动tomcat报错 Could not reserve enough space for object heap的解决办法

android studio报错“Could not reserve enough space for 1572864KB object heap”

全网首发:MAC对应用签名,运行JAVA时报错“Could not reserve enough space for code cache”的JDK流程

Error occurred during initialization of VM Could not reserve enough space for 2097152KB object heap(

gatling压力测试工具启动gatling.bat命令行窗口报Error occurred during initialization of VM Could not reserve enough