When I tried to upgrade the Android Studio version to Android Studio Chipmunk 2021.2.1, I faced below error:
Plugin [id: 'com.android.library', version: '7.2.0', apply: false] was not found in any of the following sources:
Try:
Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Exception is: org.gradle.api.plugins.UnknownPluginException: Plugin [id: 'com.android.library', version: '7.2.0', apply: false] was not found in any of the following sources:
Gradle Core Plugins (plugin is not in 'org.gradle' namespace)
Plugin Repositories (could not resolve plugin artifact 'com.android.library:com.android.library.gradle.plugin:7.2.0') Searched in the following repositories: Gradle Central Plugin Repository Google MavenRepo at
org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolveToFoundResult(DefaultPluginRequestApplicator.java:221)
at org.jetbrains.plugins.gradle.model.ProjectImportAction.execute(ProjectImportAction.java:42)
How to fix Android Studio to Android Studio Chipmunk | 2021.2.1 getting Gradle issue:
You can temporarily fix the issue by setting the Android Gradle plugin version to 7.2.0-rc02 in the Android Studio/Project Structure/Project.
Now Android Gradle plugin version 7.2.0 has been uploaded to Maven official website. Below is the link to download the required Android Gradle version:
https://mvnrepository.com/artifact/com.android.application/com.android.application.gradle.plugin
First, go to the Android Studio/Project Structure/Project and then Set the Android Gradle plugin version to 7.2.0-rc02 version. you can download the required Android Gradle 7.2.0 version from below link: https://mvnrepository.com/artifact/com.android.application/com.android.application.gradle.plugin
Now, after setting [id: ‘com.android.library’, version: ‘7.2.0’, apply: false] , it will work fine.