Plugin with id 'com.android.application' Not Found: Fix Gradle Plugin Resolution
When Gradle says plugin id com.android.application was not found, first identify how this project declares Android Gradle Plugin. Modern plugins {}/version-catalog builds and legacy buildscript { classpath(...) } builds do not use the same resolution path. Prove the declaration model before adding repositories, versions, or migrating DSL.
Search the root/module build files and version catalog before editing repositories. If com.android.application comes from a modern plugins {} declaration or alias, inspect pluginManagement. If the project still supplies AGP through buildscript/classpath, follow that legacy resolution path instead.
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}Verify: You can point to exactly one intended source of the Android plugin version/resolution for the failing module. Do not add pluginManagement as a generic fix to a project that is intentionally using the legacy buildscript model.
Why this happens
Modern Gradle plugin DSL resolution is configured separately from ordinary project dependency repositories, and Android Gradle Plugin artifacts are available through Google's Maven repository. Legacy Android builds can instead put the AGP artifact on the buildscript classpath and then apply the plugin by id. Because both patterns exist in real projects, the same visible plugin id can fail for different repository/version reasons.
Diagnose before changing more
Modern plugins DSL/root plugin declaration, version-catalog alias, or legacy buildscript classpath? Diagnose that mechanism rather than mixing fixes across all three.
A module can apply the plugin without repeating a version when the root build or version catalog already supplies it. Do not assume every module declaration needs its own version.
Putting google() only in dependencyResolutionManagement is not the same as making it available for plugin resolution.
Check that the plugin declaration style and version source still match the project structure.
Check the buildscript repository and AGP classpath coordinates/version. pluginManagement is not a drop-in repair for a build that has not migrated to the plugins DSL.
Keep the build files stable and test repository/proxy/offline access in the failing environment before changing plugin versions.
Fix #2 — declare the Android plugin version at the project level
If your project does not use a version catalog, declare a project-compatible Android Gradle Plugin version in the top-level build file and apply it in the app module. Current Android documentation uses the same plugins { id("com.android.application") version "…" apply false } model for AGP 9.x. Do not blindly paste the current documentation's version into an older project: AGP, Gradle and JDK compatibility still has to match your project.
// top-level build.gradle.kts
plugins {
id("com.android.application") version "" apply false
}
// app/build.gradle.kts
plugins {
id("com.android.application")
} Verify: Sync or run ./gradlew tasks. The build should resolve com.android.application and move past the plugin-not-found stage.
Fix #3 — legacy buildscript or migration: repair the mechanism you actually use
If this is a legacy project, verify its existing buildscript { repositories { ... } dependencies { classpath(...) } } path instead of introducing pluginManagement solely to silence the error. If the project is intentionally migrating to the plugins DSL, migrate as a deliberate project change: establish the modern version source and plugin repositories, then remove the obsolete ownership only after the new path resolves.
./gradlew tasksVerify: Run the same Gradle command from the project root. If a new compatibility or dependency error appears, the plugin-resolution problem is fixed—diagnose the new error separately.
What not to do
Still seeing the error?
If the intended declaration model and its repositories/version source are correct but Gradle still cannot resolve the plugin, preserve the first concrete resolution message. A repository/proxy/offline failure, nonexistent plugin version, and AGP/Gradle/JDK compatibility failure are different stages. Once Gradle resolves com.android.application and reports a later compatibility/configuration error, stop applying plugin-not-found fixes.
References and related guides
Still stuck? Ask the community
Share your operating system, software version, exact error text, and which fix you already tried. Another reader may have seen the same setup.
Loading community discussion…
Comments could not load here. Open ErrorHarbor Discussions on GitHub →