Hello everybody, I'm having some issues with Gradl...
# community-support
i
Hello everybody, I'm having some issues with Gradle that I can't figure out.
v
And you expect someone here to use their crystal ball? ;-)
i
sorry the log was too long so I put it as a document link
v
Please do not split topics across several threads. This makes following the conversation in the threads view very hard as the context of the other messages is missing. If you have additional information either edit the original message or post to its thread. Please delete your messages and combine them into one and better upload the files here directly or at least use some paste service like pastebin.com or gist.github.com.
i
Hello everybody, I'm having some issues with Gradle that I can't figure out. application_android_error libs_versions_toml build_gradle_kts_app build_gradle_kts_project The first issue is that com.android.application can't be found in org.gradle. The second issue is with glide I put it in libs_versions_toml and both gradles but Android Studio won't recognize "import com.bumptech.glide.integration.compose.GlideImage"
v
The error is quite clear, isn't it?
It tells you that the android gradle plugin you try to use is not found in the plugin repositories you configured
And that you have only configured the Gradle Plugin Portal (or did configure none as then it is the default)
The AGP is only published on the Google-own repository for which you can use the
google()
convenience helper
i
My top level build file does include the google() repository
v
Who cares? It is missing as plugin repository, not as dependency repository 😉
In the plugin management block of the setting script
i
Oh let me check on that
It is included but like this:
Copy code
pluginManagement {
    repositories {
        google {
            content {
                includeGroupByRegex("com\\.android.*")
                includeGroupByRegex("com\\.google.*")
                includeGroupByRegex("androidx.*")
            }
        }
        mavenCentral()
        gradlePluginPortal()
    }
}

dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()

    }
}

rootProject.name = "Login"
include(":app" )
include(":newregistration")
include(":resources")
I believe it shows up like this because I started a new project
v
That is pretty unlikely your settings script. The error shows that it only searches in Gradle Plugin Portal, neither in Google, nor in Maven Central. And with
FAIL_ON_PROJECT_REPOS
(which I also prefer to use) the build would fail if you tried to add a repository in your build script, but you said you do.
i
When I created a new android project, the error was not there. After loading an Android library, the error came, but yeah this is straight from my grade settings file.
v
Can you share a build
--scan
URL?
i
Can I send it a bit later as I'm currently away from my computer?
v
Sure
i
This is what is showing when I do a scan: Build file 'C:\Users\iziau\StudioProjects\Login\build.gradle.kts' line: 5 Plugin [id: 'com.android.application', version: '8.4.0', apply: false] was not found in any of the following sources: * Try:
Run with --stacktrace option to get the stack trace.
Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org.
BUILD FAILED in 7s The build scan was not published due to a configuration problem. The Gradle Terms of Service have not been agreed to. For more information, please see https://gradle.com/help/plugin-terms-of-service. Alternatively, if you are using Gradle Enterprise, specify the server location. For more information, please see https://gradle.com/help/plugin-enterprise-config.
v
Did you read the output? Usually it asks you for the consent, but you probably run the build non-interactively so have to configure the consent. Read the link as the message suggests.