Gradle 一直在问更新和降级? [英] Gradle keep on asking update and downgrade?

查看:32
本文介绍了Gradle 一直在问更新和降级?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不断收到Gradle Sync 错误",所以我检查了 1.8 版.更新到 1.10,然后它说我需要 1.9,所以我降级到 1.9 它说我需要 1.8,当我降级到 1.8 时它说我需要 1.9.

I keep on getting "Gradle Sync error" so i checked had version 1.8. updated to 1.10, then it said i need 1.9, so i downgraded to 1.9 it said i need 1.8, when i downgrade to 1.8 it says i need 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.

推荐答案

AS 尚不支持 Gradle 1.10,Android 工具开发团队正在努力,可能会在下一个版本中提供.

Gradle 1.10 is not yet supported in AS, Android Tools Developer team is working on it and probably will be available in next release.

到目前为止,请确保项目中的所有 build.gradle 文件都使用 gradle 1.9 作为依赖项

As of now make sure all your build.gradle files in the project using gradle 1.9 as dependency

  buildscript {
      repositories {
        mavenCentral()
      }
  dependencies {
      classpath 'com.android.tools.build:gradle:0.7.+'
     }
  }

更新:

Android studio 0.4.3 版本后现在支持 Gradle 1.10,因此您可以像这样在类路径中使用 0.8.+ 开始使用 1.10 插件

Gradle 1.10 is now supported in Android studio after release 0.4.3, so going forward you can start using 1.10 plugin by using 0.8.+ in your classpath like this

classpath 'com.android.tools.build:gradle:0.8.+'

这篇关于Gradle 一直在问更新和降级?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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