xjcl
xjcl

Reputation: 15329

Gradle sync failed: Support for builds using Gradle versions older than 2.6 was removed [...]. You are currently using Gradle version 2.2.1

I'm trying to build an old app I made in 2015. But I keep getting above error in Android Studio.

I tried bumping the version number to 2.6 or to 3.6.3 (as Android Studio suggested) but the message keeps appearing.

Upvotes: 1

Views: 1861

Answers (1)

xjcl
xjcl

Reputation: 15329

Android Studio tries to download the appropriate version from jcenter, specifically from this directory. As you can see it only has gradle versions up to 2.3.0. So you will need to add another repository which has newer builds.

The fix is to change your module-levels build script in all two places from

repositories {
    jcenter()
}

to

repositories {
    google()
    jcenter()
}

Upvotes: 1

Related Questions