Error: The project is using an unsupported version of Gradle

Viewed 2781

My gradle version is 2.2 in Project's gradle wrapper properties:

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

build.gradle:

buildscript {
repositories {
    jcenter()
}
dependencies {
    classpath 'com.android.tools.build:gradle:1.5.0'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

I am getting an error while building the apk

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.)

1 Answers

As you can clearly see you are using very old version of gradle in your project which is no more supported.

Make sure that latest gradle version gradle-4.4 is installed on your machine. Also make sure you are using latest Android Stdio 3.1.4.

Once you have above latest setup, then make below changes in your project files:

project build.gradle

dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'


    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}

project gradle/gradle-wrapper.properties

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