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.
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.pomCommon 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.
cd android && ./gradlew :app:dependencies --configuration debugRuntimeClasspathPin an available version and a live repository
- Pick a version that is actually published.
- Replace any
jcenter()withmavenCentral()andgoogle(). - Re-run with
--refresh-dependenciesif a cached miss persists.
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.