Since I upgraded my project to Android Gradle Plugin 7.1.3, I can't build it anymore.
Error :
Plugin [id: 'com.android.application', version: '7.1.3', 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.application', version: '7.1.3', 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.application:com.android.application.gradle.plugin:7.1.3') Searched in the following repositories: Gradle Central Plugin Repository Google MavenRepo
build.gradle :
plugins {
id 'com.android.application' version '7.1.3' apply false
id 'com.android.library' version '7.1.3' apply false
id 'org.jetbrains.kotlin.android' version '1.6.10' apply false
}
task clean(type: Delete) {
delete rootProject.buildDir
}
settings.gradle :
pluginManagement {
repositories {
gradlePluginPortal()
google()
mavenCentral()
}
}
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
}
}
include ':app'
rootProject.name = "MyApp"
The problem occurred after I clicked the "Begin Upgrade" button below the following message :
To take advantage of the latest features, improvements, and security fixes, we strongly recommend that you upgrade the Android Gradle Plugin in this project (MyApp) from the current version 7.1.2 to version 7.1.3.