Gradle Error : Could not find com.android.tools.build:gradle:6.6.1

Viewed 8969

I'm trying to build my android project, but I've got this error :

Could not find com.android.tools.build:gradle:6.6.1.

Searched in the following locations:

2 Answers

Gradle version and gradle plugin version are different things. Gradle version 6.6.1 exist but gradle plugin version 6.6.1 does not exist. You need to update gradle plugin version as 4.0.2 in your app level build.gradle file.

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

You can find more information from https://developer.android.com/studio/releases/gradle-plugin

You need to check these two files.

enter image description here

enter image description here

Related