Error:Failed to complete Gradle execution.

来源:互联网 发布:discuz数据调用 编辑:程序博客网 时间:2024/06/14 00:36

在初次创建Android项目的时候,经常会报如下错误:

Error:Failed to complete Gradle execution.Cause: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.htmlPlease read the following process output to find out more:-----------------------Error occurred during initialization of VMCould not reserve enough space for 1572864KB object heap

因为每台PC 上的 AS 配置不同,可能会导致出现上面的情况。而我这里的原因是,在gradle.properties 文件里 JVM 配置出错。

所以在项目目录下面的gradle.properties文件中将如下这句话:

org.gradle.jvmargs=-Xmx1536m
改成:

org.gradle.jvmargs=-Xmx512m
然后重新build下就好了。

阅读全文
0 0
原创粉丝点击