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.
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
- Check the coordinates on Maven Central / Google Maven
- Add
google()andmavenCentral()independencyResolutionManagement - Disable offline mode in Android Studio
- Refresh:
./gradlew build --refresh-dependencies
Detailed fix by platform
Android
- settings.gradle(.kts):kotlin
dependencyResolutionManagement { repositories { google() mavenCentral() } }
How to diagnose
- Artifact — Exact group:name:version
- Repos — Searched repositories listed in the error
- 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.
Was this page helpful?
Report a correction or suggest an improvement
Last updated 2 Oct 2026