Error:Unable to start the daemon process. This problem might be caused by incorrect configuration of

来源:互联网 发布:python try catch 编辑:程序博客网 时间:2024/06/07 15:07

今天打开Android Studio,报了一个错误,错误如下:

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 https://docs.gradle.org/2.14.1/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

具体原因是Android Studio 中 gradle 构建 堆栈空间不足,

解决方案是打开gradle.properties,我这里是这样一句代码:

org.gradle.jvmargs=-Xmx1536m

解决方案是修改后面的数字,改为:

org.gradle.jvmargs=-Xmx512m

这样改完后,就能正常运行了

0 0