所以我刚刚更新到0.4.2,突然之间我收到了有关Gradle版本的错误。我尝试了一些类似问题的方法,方法是在“ Gradle Settings”中选择“ Use local gradle distribution”,使用该错误所要解决的问题。到目前为止,这些是我得到的消息:
You are using Gradle version 1.6, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
You are using Gradle version 1.8, which is not supported. Please use version 1.9.
Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)
Gradle version 1.6 is required. Current version is 1.9.
Please fix the project's Gradle settings.
在这些错误之间交替切换,具体取决于我切换到的版本,因此我不确定是什么问题。另外,我确实从gradle网站下载了1.8(-all)版本,但我相信其他版本已由Android Studio下载。
您需要在Android Studio 0.4.2中使用Gradle 1.9。将发行版网址指向gradle 1.9,否则您的build.gradle应该如下所示:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.7.+'
}
}
如果这样不起作用,请删除gradle目录并运行它。它应该自行下载适当的库
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句