小编典典

Android Studio Gradle项目同步失败

java

我收到错误消息:“ 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/1.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.

我在这里阅读时试图删除.gradle文件夹。昨天可以正常工作,但是今天当我启动Android
Studio时,错误再次显示,删除.gradle文件夹无济于事。

我真的不知道该怎么办。

有没有人有什么建议?


阅读 911

收藏
2020-12-03

共1个答案

小编典典

只是一个盲目的猜测:尝试在项目的 gradle.properties 文件中添加类似的内容:

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