Gradle version 1.6 is required. Current version is 1.8-20130730220035+0000

前端 未结 7 645
轻奢々
轻奢々 2020-12-24 01:23

Just updated Android-Studio to version 0.2.7 an now I get the error message from the title:

\"e

相关标签:
7条回答
  • 2020-12-24 02:06

    We have two computers, one of which gave that same message after upgrading to Android Studio 0.2.7. We noticed that the computer which could still build had Gradle installed independently of Android Studio.

    Installing Gradle 1.6 downloaded from the Gradle web site fixed this issue on the computer that wouldn't build.

    0 讨论(0)
  • 2020-12-24 02:13

    I managed to fix my project through some combination of invalidating Android Studio cache, deleting .idea and .gradle directories and .iml files, restarting Studio, and reimporting the project:

    Invalidate Cache confirm

    on Mac OSX using Homebrew, brew install gradle then pick local gradle distribution and point to /usr/local/Cellar/gradle/1.7/libexec for gradle home: local distribution

    0 讨论(0)
  • 2020-12-24 02:14

    My fix was basically what Abe did but I wanted to give a bit more explanation:

    Download gradle 1.6 from the gradle website

    Extract somewhere on your pc/mac

    Open up android studio, go to Preferences -> Gradle (left panel) -> and chooose Local gradle distribution. Point Gradle home to the location where you extracted gradle.

    This fixed the issue for me. Using the gradle wrapper and the bundled gradle distribution both failed

    0 讨论(0)
  • 2020-12-24 02:15

    Here's what I did to get my project working:

    1. Installed Gradle 1.7 on my OS (OS X users can use brew for this)
    2. Added this to my local.properties file: sdk.dir=/Applications/Android\ Studio.app/sdk
    3. Created gradle wrappers with gradle wrapper command.
    4. Chose "Use gradle wrapper (recommended)" option in Android Studio.
    0 讨论(0)
  • 2020-12-24 02:17

    In my case, i updated gradle to the latest version (1.8) and then changed the gradle.build files (for my project and for the libraries i was using) like these:

    dependencies {
        classpath 'com.android.tools.build:gradle:0.6.1+'
    }
    

    The Synchronize files and Refresh/Invalidate cache. This seems to solve the problem. I think that Gradle in order to determine the minimum required version just reads the above value.

    0 讨论(0)
  • 2020-12-24 02:19
    1. Go to Preferences > Project Settings > Gradle and choose "Use gradle wrapper" instead of the bundled option
    2. Open your gradle-wrapper.properties and change the distributionUrl to use 1.7 if it is not already (mine was 1.6), i.e. distributionUrl=http\://services.gradle.org/distributions/gradle-1.7-bin.zip
    0 讨论(0)
提交回复
热议问题