Android的工作室 - 摇篮同步项目不合格 [英] Android Studio - Gradle sync project failed
问题描述
在Android的工作室,我只是创建了一个新的项目,并说:
摇篮工程同步失败。基本的功能将无法正常工作。
我已经在网上搜索并尝试了一切,但是毫无效果。我用摇篮1.11 Android的工作室v0.4.6。
错误消息是:
的失败:建立失败,一个例外。 * 哪里: 建立文件C:\用户\维尼\ AndroidStudioProjects \ MyFirstAppProject \ MyFirstApp \ build.gradle'行:9 * 什么地方出了错: 发生问题评估项目:MyFirstApp。 >摇篮版本1.10是必需的。现在的版本是1.11。如果使用的摇篮包装,尽量编辑distributionUrl中C:\Users\Vinnie\AndroidStudioProjects\MyFirstAppProject\MyFirstApp\gradle\wrapper\gradle-wrapper.properties到gradle-1.10-all.zip * 尝试: 与--stacktrace选项获取堆栈跟踪运行。与--info或--debug选项运行,以获得更多的日志输出。 构建失败 总时间:1分钟7.011秒
在Android插件0.8.4不支持摇篮1.11,则需要使用1.10。
您可以在摇篮控制台选项卡中读取正确的错误消息。
修改
您需要修改摇篮/封装/ gradle-wrapper.properties
文件中是这样的:
distributionBase = GRADLE_USER_HOME
distributionPath =包装/ dists中
zipStoreBase = GRADLE_USER_HOME
zipStorePath =包装/ dists中
distributionUrl = HTTP \://services.gradle.org/distributions/gradle-1.10-all.zip
In Android Studio, I simply created a new project, and it says that:
Gradle project sync failed. Basic functionality will not work properly.
I have searched the web and tried everything, but nothing worked. I have v0.4.6 of Android Studio using Gradle 1.11.
The Error Message Is:
FAILURE: Build failed with an exception. * Where: Build file 'C:\Users\Vinnie\AndroidStudioProjects\MyFirstAppProject\MyFirstApp\build.gradle' line: 9 * What went wrong: A problem occurred evaluating project ':MyFirstApp'. > Gradle version 1.10 is required. Current version is 1.11. If using the gradle wrapper, try editing the distributionUrl in C:\Users\Vinnie\AndroidStudioProjects\MyFirstAppProject\MyFirstApp\gradle\wrapper\gradle-wrapper.properties to gradle-1.10-all.zip * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. BUILD FAILED Total time: 1 mins 7.011 secs
The Android plugin 0.8.x doesn't support Gradle 1.11, you need to use 1.10.
You can read the proper error message in the "Gradle Console" tab.
EDIT
You need to change gradle/wrapper/gradle-wrapper.properties
file in this way:
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip
这篇关于Android的工作室 - 摇篮同步项目不合格的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!