Plugin with id 'com.android.application' Not Found: Fix Gradle Plugin Resolution
Gradle resolves build plugins separately from normal project dependencies. For Android builds, the `com.android.application` plugin must be resolvable from the project’s plugin configuration and Google’s repository.
Open `settings.gradle` or `settings.gradle.kts` and confirm the repositories used for plugin resolution include Google’s Maven repository.
pluginManagement {
repositories {
google()
mavenCentral()
gradlePluginPortal()
}
}Verify: Gradle has a repository configuration capable of resolving the Android Gradle Plugin.
Why this happens
Gradle uses plugin repositories separately from repositories for normal project dependencies. Android’s Gradle plugin is published through Google’s repository, and modern Android projects commonly declare the plugin version at the top level while applying the plugin in the app module.
Diagnose before changing more
If the module only says `id("com.android.application")`, the project still needs a version supplied by the root build or version catalog.
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.
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. Do not blindly paste the newest version into an older project.
// top-level build.gradle.kts
plugins {
id("com.android.application") version "" apply false
}
// app/build.gradle.kts
plugins {
id("com.android.application")
} Fix #3 — align repository and plugin declarations after migration
If the project mixes old `buildscript`/`classpath` configuration with a newer `plugins {}` layout, finish the migration consistently. Keep plugin repositories in `pluginManagement`, then sync the project again.
./gradlew tasksStill seeing the error?
If the plugin declaration and repositories are correct but Gradle still cannot resolve it, check network/proxy access to Google Maven and the compatibility of the selected AGP, Gradle and JDK versions. That is a resolution or compatibility problem, not an app-module dependency problem.
Official references
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 →