Plugin [id: 'com.android.application', version: '7.1.3', apply: false] was not found in any of the following sources:

Viewed 563

Just upgraded the IDE and started to sync the gradle but IDE throwing this error.

2 Answers

The way to solve it is

Go to Help and about to see your android studio version
go to File>Project Structure> and set your Android Gradle Plugin version to your android studio version
Change the Gradle version to the one you usually use.

If that does not work do this

id 'com.android.application' version '7.0.2' apply false
    id 'com.android.library' version '7.0.2' apply false
    id 'org.jetbrains.kotlin.android' version '1.5.21' apply false

If still, the error persists then find the gradle-wrapper.properties file and change it to compatible version :

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

change 7.2 to your Gradle version

Related