5

When I try to import the tutorials app to Android Studio, I get this message:

The project is using an unsupported version of Gradle.

Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)

I’m new to Android Studio, and meter too. What’s the problem with Gradle?

I’m using Android Studio 1.0.1.

Community
  • 1
  • 1
AFS
  • 1,433
  • 6
  • 28
  • 52

3 Answers3

2

Android Studio 1.0.1 supports gradle 2.2.1+ and Android Gradle Plugin 1.0.0+

How to change the gradle version.

In your project you should have a folder gradle/wrapper. Inside you will find the gradle-wrapper.properties file.

Change this line inside

distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip

How to change gradle plugin version:

In your project you should have a build.gradle file in the root folder.

Inside:

// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
    repositories {
        jcenter()   // or mavenCentral()
    }

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

Pay attention. Each module has a own build.gradle file. Inside you can override the default configuration.

More info here.

Gabriele Mariotti
  • 320,139
  • 94
  • 887
  • 841
  • 3
    I am using `android studio 1.1.0` and my gradle version with `gradle -v` is `2.2.1`. Still get the error: `The project is using an unsupported version of Gradle. Please point to a supported Gradle version in the project's Gradle settings or in the project's Gradle wrapper (if applicable.)` – tread Mar 19 '15 at 14:57
1

I too have faced this issue, To resolve this issue there are two things you need to try.

  1. You need to remember exactly what version of gradle distribution url you were adding to your existing project.

  2. if you didn't remember, you have to goto https://services.gradle.org/distributions/ and do trial and error. Add all versions to gradle distribution url like shown below.

distributionUrl=https://services.gradle.org/distributions/gradle-2.2.1-all.zip

only change the last version number 2.2.1-all to 3.5-all and so on.

Inayath
  • 99
  • 9
0

In gradle-wrapper.properties, modify the gradle version. Change to a newer one. The reason is generally: gradle and JDK, different versions are not compatible. Change the JDK to the old version.