Android Studio Gradle 项目同步失败 [英] Android Studio Gradle project sync failed

查看:203
本文介绍了Android Studio Gradle 项目同步失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到错误:Gradle 项目同步失败.基本功能(例如编辑)将无法正常工作."

I'm getting error: "Gradle project sync failed. Basic functionality (e.g. eiditing) will not work properly."

和错误日志:

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 文件夹无济于事.

I was trying to delete .gradle folder as I read here. This worked yesterday but today when I started Android Studio the error showed again and deleting .gradle folder doesn't help.

我真的不知道该怎么办.

I realy don't know what to do.

有人有什么建议吗?

推荐答案

只是盲目猜测:尝试在项目中的 gradle.properties 文件中添加这样的内容:

Just a blind guess: try to add something like this to your gradle.properties file in the project:

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

这篇关于Android Studio Gradle 项目同步失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆