Hello, I am trying to upgrade Android Gradle Plugi...
# community-support
y
Hello, I am trying to upgrade Android Gradle Plugin from
8.8.0
to
8.10.0
and Gradle from
8.10.2
to
8.11.1
. It works just fine on Linux Environment (WSL) yet does not working properly on Windows. Everytime I run gradle command, It returns this error message:
Copy code
FAILURE: Build failed with an exception.

* Where:
Build file 'C:\repositories\github\AndroidApplication\build.gradle.kts' line: 2

* What went wrong:
Plugin [id: 'com.android.application', version: '8.10.0', 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.10.0')
  Searched in the following repositories:
    Google
    MavenRepo
    Gradle Central Plugin Repository

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at <https://help.gradle.org>.

BUILD FAILED in 5s
My setup: OpenJDK: 19.0.2 2023-01-17 Gradle: 8.11.1 Android Gradle Plugin: 8.10.0 Thank you in advance!
p
With this information, it’s not possible to tell the exact problem. The artifact is definitely available at Google: https://maven.google.com/web/m_index.html#com.android.application:com.android.application.gradle.plugin:8.10.0 Can you share a build scan?
y
My apologize, I couldn't. On the logs, it says it can't resolve the artifact from this URL https://dl.google.com/android/maven2/com/android/application/com.android.applicatio[…]plugin/8.10.0/com.android.application.gradle.plugin-8.10.0.pom, but when I click it, I am able to download it. I think this is secure connection issue as my company uses proxy. However, I can download v8.8.0 just fine after disabling SSL on
gradle.properties
.
I end up using remote repository and it seems like working fine now. It's weird I can download v8.8.0 just fine, but not v8.9.0 or later Thank you @Philip W for your response!
m
Hi @Yukha D , What do you mean by remote repository . Do you mean the centralized artifact repository manager like nexus deployed for enterprise use or publicly available repositories like google mavenrepo. Since we mention the version for community plugins and the version 8.10.0 may not be available on the enterprise repository manager , you may be facing this issue. I am new to the community so it will be good if anybody else can confirm this . To verify it you may search for 8.10.0 on the repositories listed in the build file or root project settings file repositories in pluginManagement or the buildscript repositories in the build.gradle(.kts) file If you are not able to find it in the same , this will confirm the reason .
v
You see in his original post which repositories were tried. Unless he uses custom repositories with those names, it showed that Gradle tried to look in the correct repository for the artifact. If it nevertheless fails, this usually has one of three reasons. • a temporary outage somewhere, just retrying - eventually with
--refresh-dependencies
- will resolve that • something intervening and disturbing the download like a Firewall or AntiVirus (or which also happened in the past, government of India requesting a specific version of a specific plugin to be blocked for whatever reason) • the computer needs to use a proxy to access the outworld which is not configured to be used by Gradle
m
Hi @Vampire . Thanks for the feedback
👌 1
y
Hello @Manish Chauhan, I'm not sure why I couldn't properly download AGP 8.10.0 from official Google Maven Repository. Based on logs, Gradle able to find the plugin on Google Maven Repository and create proper SSL connection, then close the connection without additional error message. However, after that Gradle also tries to download from other stated repositories such as Maven Central. As for remote repository, it's publicly available 1:1 replica of official Google Maven Repository Hello @Vampire, I've tried
--refresh-dependencies
and it doesn't solve my problem. So, probably my company proxy configuration prevents the fetch process.