Gradle says the plugin id you asked for does not exist in any repository it searched
Plugin [id: 'com.android.application', version: '8.x.x', apply: false] was not found in any of the following sources:Short answer
Gradle searched every repository listed for plugins and none had that id at that version. Read the list under the error: it shows where Gradle looked. Then check three things in order: the repository that hosts the plugin is in pluginManagement, the id and version really exist, and a private repository has the plugin marker.
Fix it fast
1Find out which cause you have
Run any task and read the full list of sources printed below the error. If Google's Maven repository is not in that list, the first cause applies. If it is there, the id or version is wrong.
./gradlew help --stacktrace2Match what you see, then jump to its fix
- 1
The list of sources shows only the Gradle Central Plugin RepositoryThe repository that hosts the plugin is not in pluginManagementFix - 2
The repository is listed, but the error still names a version you never published or installedThe plugin id or version does not existFix - 3
A company plugin id fails while its jar is clearly in the repositoryA private repository has the jar but not the plugin markerFix
- 1
What does the error look like?
Plugin [id: 'com.android.application', version: '8.x.x', apply: false] was not found in any of the following sources:Gradle Central Plugin Repository (no 'google()' listed)Plugin 'com.example.plugin' was not found in any of the following sources
Cause 1 of 3
The repository that hosts the plugin is not in pluginManagement
1Check
A plugin in the plugins block is searched for in the repositories declared inside pluginManagement in settings.gradle(.kts). Nothing else counts, and that block must be the first one in the file. The Android Gradle plugin is published on Google's Maven repository, not on the Plugin Portal.
sed -n '1,25p' settings.gradle.kts settings.gradle 2>/dev/null2Fix
Put pluginManagement first in the settings file and list google() in it, ahead of the portal.
// settings.gradle.kts
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}3Verify
The failing list now includes the repository, and the build moves on to the next step.
./gradlew helpConfirmed by docs.gradle.org
Cause 2 of 3
The plugin id or version does not exist
1Check
A typo in the id, or a version number that was never released, produces the same message. Compare the id and version in the root build file, or the version catalog, with the compatibility table in the Android Gradle plugin release notes.
grep -rn "com.android\|agp" build.gradle* gradle/libs.versions.toml2Fix
Use one released version, written once. In a version catalog it lives under versions and the plugin entry points at it. For a single module you can also set it directly in the plugins block.
# gradle/libs.versions.toml
[versions]
agp = "9.5.1"
[plugins]
androidApplication = { id = "com.android.application", version.ref = "agp" }3Verify
Sync again. The plugin resolves and the next error, if any, is a different one.
./gradlew helpConfirmed by developer.android.com
Cause 3 of 3
A private repository has the jar but not the plugin marker
1Check
Gradle looks for a marker artifact named after the plugin id (id:id.gradle.plugin:version). A repository that only holds the implementation jar cannot answer the lookup.
curl -I https://repo.example.com/maven/com/example/plugin/com.example.plugin.gradle.plugin/1.0.0/2Fix
Publish the marker with the java-gradle-plugin, or map the id to the implementation module in pluginManagement.
// settings.gradle.kts
pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.id == "com.example.plugin") {
useModule("com.example:plugin-impl:${requested.version}")
}
}
}
}3Verify
The plugin id resolves from the private repository.
./gradlew helpConfirmed by docs.gradle.org
How do I stop it coming back?
- Keep pluginManagement as the first block of settings.gradle(.kts), with google() in it from the first commit.
- Declare the Android Gradle plugin version in one place, the version catalog.
- Copy plugin ids and versions from the release notes instead of typing them.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
Related fixes
Mobile apps
Gradle fails to resolve the buildscript classpath, so the build never starts
Could not find com.android.tools.build:gradle:8.x.x.
Gradle could not download a build plugin, usually the Android Gradle plugin.
3 causes, each with a fixMobile apps
adb cannot start because something already holds its port
adb start-server failed
The adb server must bind local TCP port 5037, and every adb client talks to it there.
2 causes, each with a fixMobile apps
The phone shows as unauthorized and Android Studio will not run the app
adb devices lists the phone but Android Studio cannot deploy to it
An unauthorized phone means it has not trusted this computer's RSA key.
3 causes, each with a fixMobile apps
Android Studio cannot pair the phone over Wi-Fi
The Pair devices over Wi-Fi dialog lists no device
Wireless pairing needs the phone on Android 11 or higher and on the same Wi-Fi network as the computer, with current Platform-Tools.
4 causes, each with a fixMobile apps
adb cannot connect to its daemon or start the server
* daemon started successfully *
The adb server is a background process on your computer that listens on TCP port 5037.
2 causes, each with a fixMobile apps
adb prints 'server version doesn't match this client; killing...'
adb server version doesn't match this client; killing...
adb runs a background server, and every adb command is a client.
3 causes, each with a fix