Could not resolve 🤖 Android

Gradle: Could not resolve all files for configuration / Could not resolve dependency

Gradle couldn’t download a dependency — wrong coordinates/version, missing repository, offline mode, or network/proxy issues.

Seen on: Android Java

Meaning

Gradle lists every repository it tried. If the artifact isn’t in any of them (or the network blocks them), the build fails.

Common causes

  • Typo or non-existent version
  • Repository missing (google(), mavenCentral()) in settings.gradle
  • Using deprecated jcenter()
  • Gradle offline mode enabled
  • Corporate proxy/SSL interception
  • Corrupted Gradle cache

⚡ Quick fix

  1. Check the coordinates on Maven Central / Google Maven
  2. Add google() and mavenCentral() in dependencyResolutionManagement
  3. Disable offline mode in Android Studio
  4. Refresh: ./gradlew build --refresh-dependencies

Detailed fix by platform

Android

  1. settings.gradle(.kts):
    kotlin
    dependencyResolutionManagement {
        repositories {
            google()
            mavenCentral()
        }
    }

How to diagnose

  1. Artifact — Exact group:name:version
  2. Repos — Searched repositories listed in the error
  3. Network — Proxy/offline?

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.