Just upgraded the IDE and started to sync the gradle but IDE throwing this error.
Just upgraded the IDE and started to sync the gradle but IDE throwing this error.
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