Gradle继续询问更新和降级?

Bil*_*han 8 gradle android-studio

我继续得到"Gradle Sync错误",所以我检查了版本1.8.更新到1.10,然后它说我需要1.9,所以我降级到1.9它说我需要1.8,当我降级到1.8它说我需要1.9.

15:28:09 Failed to refresh Gradle project 'Calendar'
         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.)
         Fix Gradle wrapper and re-import project Gradle settings
15:28:26 Failed to refresh Gradle project 'Calendar'
         You are using Gradle version 1.10, 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.)
         Fix Gradle wrapper and re-import project Gradle settings
15:28:39 Failed to refresh Gradle project 'Calendar'
         Gradle version 1.8 is required. Current version is 1.9. If using the gradle wrapper, try editing the distributionUrl in
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Android
Studio\gradle\wrapper\gradle-wrapper.properties to gradle-1.8-all.zip.
         Please fix the project's Gradle settings.
Run Code Online (Sandbox Code Playgroud)

pyu*_*s13 10

AS中尚不支持Gradle 1.10,Android Tools开发团队正在开发它,可能会在下一版本中提供.

截至目前,使用gradle 1.9作为依赖项确保项目中的所有build.gradle文件

  buildscript {
      repositories {
        mavenCentral()
      }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.7.+'
     }
  }
Run Code Online (Sandbox Code Playgroud)

更新:

Android版本在0.4.3版本之后现在支持Gradle 1.10,所以你可以0.8.+在你的类路径中使用像这样开始使用1.10插件

classpath 'com.android.tools.build:gradle:0.8.+'
Run Code Online (Sandbox Code Playgroud)