Skip to content
Latchkey

Flutter "Could not resolve all files for configuration" (Android) in CI

Gradle could not download every artifact needed for an Android configuration such as :app:debugRuntimeClasspath. A dependency version is missing from the declared repositories, or a repository (often a removed jcenter) is unreachable.

What this error means

The Gradle build fails with "Could not resolve all files for configuration ':app:...Classpath'." and a "Could not find" or "Could not GET" line naming the artifact and repository it tried.

Gradle
FAILURE: Build failed with an exception.
* What went wrong:
Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.google.android.gms:play-services-base:18.99.0.
  Searched in the following locations:
    - https://dl.google.com/.../play-services-base-18.99.0.pom

Common causes

A dependency version does not exist in the repos

A plugin or app dependency pins a version that is not published to the declared google()/mavenCentral() repositories.

A removed or unreachable repository

Builds still pointing at the shut-down jcenter() or a private Maven that is down cannot fetch the artifact.

How to fix it

List the dependency and the searched repos

See where Gradle looked and which version it wanted.

Terminal
cd android && ./gradlew :app:dependencies --configuration debugRuntimeClasspath

Pin an available version and a live repository

  1. Pick a version that is actually published.
  2. Replace any jcenter() with mavenCentral() and google().
  3. Re-run with --refresh-dependencies if a cached miss persists.
android/build.gradle
repositories {
    google()
    mavenCentral()
}

How to prevent it

  • Use only maintained repositories (google, mavenCentral).
  • Verify dependency versions exist before pinning them.
  • Cache the Gradle dependency cache so transient fetch misses do not repeat.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →