8

The error:

The project is using an unsupported version of Gradle.  Please use version 1.10.


My `gradle.build` file says this:

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

As far as I know, the above line is correct. My gradle-wrapper file says:

distributionUrl=http\://services.gradle.org/distributions/gradle-1.12-all.zip

This happened when I downloaded the newest Android Studio beta (v.8) and tried to import an app that had, what I assume is an old version of Gradle.

Also, when I hit "Fix Gradle Wrapper and re-import project", nothing happens.

TheLettuceMaster
  • 15,594
  • 48
  • 153
  • 259

3 Answers3

13

If you want to change the gradle-wrapper to a lower version you have to change distributionUrl to

distributionUrl=http\://services.gradle.org/distributions/gradle-1.10-all.zip

and then rerun the wrapper task. If this isn't enough just delete the folders .gradle and gradle and the files gradlew and gradlew.bat. The rerun wrapper and he downloads gralde 1.10

Since gradle had some major api changes from version 1.10 and 1.12 you can not build any project with a higher version then the plugins are build with. So if the android plugin is build with gradle 1.10 you have to use the same version

The End
  • 709
  • 3
  • 18
1

Error: "Gradle version 1.10 is required. Current version is 2.0"

Why it show: Attempting to build an Android project that requires 1.10 version of Gradle while using 2.0 version of it as native.

What should be done to resolve this problem: Updating the gradle version within build.gradle file

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

replacing it with

dependencies {
    classpath 'com.android.tools.build:gradle:1.0.+'
}
childno͡.de
  • 4,679
  • 4
  • 31
  • 57
Abhishek Tamta
  • 463
  • 5
  • 14
0

There is a difference between Gradle version and Gradle Android Plugin version (0.12.+).
Looks like you need Gradle version 1.10, don't think later versions are supperted by the Gradle Android plugin yet. Anyway, I think making sure that you use Gradle 1.10 version will resolve this issue.

indivisible
  • 4,892
  • 4
  • 31
  • 50
C0D3LIC1OU5
  • 8,600
  • 2
  • 37
  • 47
  • Where are you able to upgrade/change the actual Gradle version? Edit: It looks like this is set in Gradle Wrapper I think. I try to change it there and nothing happens. When I try to re-sync, it goes back to 1.12. – TheLettuceMaster Jun 27 '14 at 21:10
  • Not sure that wrapper will support rolling back to previous versions, i would try to uninstall Gradle alltogether and install the correct version only. – C0D3LIC1OU5 Jun 27 '14 at 23:56
  • Is it possible to just blow away all the Gradle setting in the project and AS will auto rebuild it if I resetup the project? – TheLettuceMaster Jun 28 '14 at 01:19
  • 1
    I think it'll only take care of the Android Gradle plugin. Pretty sure it will use the existing Gradle installation, which is the wrong version in your case. – C0D3LIC1OU5 Jun 28 '14 at 05:08
  • gradle 1.12 works fine with gradle android plugin 0.11+ – RichieHH Jul 27 '14 at 13:03