Help with new build.gradle

I try to go from com.android.tools.build:gradle:8.8.2 to 8.12.2 . Gradle version is 9.0.0-rc-3

In my build.gradel, i’ve :

 plugins {
        id 'com.android.application' version '8.12.2' apply false
        id 'com.android.library' version '8.12.2' apply false
        id 'org.jetbrains.kotlin.android' version '2.2.10' apply false
    }


dependencies {

        google()
        mavenCentral()
        mavenLocal()
        maven {
            url "https://maven.java.net/content/groups/public/"
        }
        maven { url "https://jitpack.io" }

        maven {
            url "https://repo.itextsupport.com/android"
        }
    }


application {
    mainClass = 'com.prod.gfer94'

I’ve an error:

Build file ‘D:\\Documents\\Applications District\\GFER94 Android\\build.gradle’ line: 5

Plugin \[id: ‘com.android.application’, version: ‘8.12.2’, apply: false\] was not found in any of the following sources:

* Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
* Included Builds (No included builds contain this plugin)
* Plugin Repositories (could not resolve plugin artifact ‘com.android.application:com.android.application.gradle.plugin:8.12.2’)
  Searched in the following repositories:
  Gradle Central Plugin Repository


* Try:

> Run with --info or --debug option to get more log output.
> Run with --scan to generate a Build Scan (Powered by Develocity).
> Get more help at https://help.gradle.org.

* Exception is:
  org.gradle.api.plugins.UnknownPluginException: Plugin \[id: ‘com.android.application’, version: ‘8.12.2’, apply: false\] was not found in any of the following sources:


* Gradle Core Plugins (plugin is not in ‘org.gradle’ namespace)
* Included Builds (No included builds contain this plugin)
* Plugin Repositories (could not resolve plugin artifact ‘com.android.application:com.android.application.gradle.plugin:8.12.2’)
  Searched in the following repositories:
  Gradle Central Plugin Repository
  at org.gradle.plugin.use.resolve.internal.PluginResolutionResult.getFound(PluginResolutionResult.java:112)
  at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.resolvePluginRequest(DefaultPluginRequestApplicator.java:197)
  at org.gradle.plugin.use.internal.DefaultPluginRequestApplicator.applyPlugins(DefaultPluginRequestApplicator.java:101)
  at org.gradle.configuration.DefaultScriptPluginFactory$ScriptPluginImpl.apply(DefaultScriptPluginFactory.java:123)
  at org.gradle.configuration.BuildOperationScriptPlugin$1.run(BuildOperationScriptPlugin.java:68)
  at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:29)
  at org.gradle.internal.operations.DefaultBuildOperationRunner$1.execute(DefaultBuildOperationRunner.java:26)
  at org.gradle.internal.operations.DefaultBuildOperationRunner$2.execute(DefaultBuildOperationRunner.java:66)

Can you help me

Thank you very much

The error is quite clear, isn’t it?
It tells you that you only have “Gradle Central Plugin Repository” as plugin repository and that does not contain the AGP.
You need to add google() or any other repository that provides the AGP as plugin repository in your settings script.

Thank you very much so we can help, I followed your advice and now it’s correct

1 Like