I’m trying to build an Android app using Android Studio, and I’m having issues resolving the Google Sheets API dependency during Gradle sync.
What I’ve tried:
- Added the required dependencies to
build.gradle
(app-level):implementation 'com.google.api-client:google-api-client-android:1.32.1' implementation 'com.google.api-client:google-api-client-gson:1.32.1' implementation 'com.google.apis:google-api-services-sheets:v4-rev20220328-1.32.1'
I consistently get the following error during Gradle sync::
Could not resolve all dependencies for configuration ‘:app:debugRuntimeClasspath’.
Could not find com.google.apis:google-api-services-sheets:v4-rev20220328-1.32.1.
What could be causing Gradle to fail to resolve this dependency, and are there any specific steps to debug or resolve this issue?
repositories include both google() and mavenCentral() in both settings.gradle and build.gradle.
Gradle is not in Offline mode.
my internet connection is working and I can access Maven Central via a browser.
Tried switching networks and disabling my firewall/antivirus to rule out network issues.
Updated Gradle Wrapper to the latest version (gradle-8.9-bin.zip) and Android Studio to the latest stable release.
אורי עזריה is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
What could be causing Gradle to fail to resolve this dependency
I do not know where you found v4-rev20220328-1.32.1
as a version, but that is not one of the published versions.
are there any specific steps to debug or resolve this issue?
Choose a version that exists. Preferably, use more modern versions than the ones that you are trying to use.