Skip to content
Latchkey

Gradle "Could not find group:artifact:version" in CI

Gradle searched every declared repository for a coordinate and found no matching POM. The "Searched in the following locations" list shows exactly where it looked, which reveals whether the version, the name, or the repository is wrong.

What this error means

The build fails with "Could not find com.example:lib:1.0" and a "Searched in the following locations:" list of URLs that were all misses.

Gradle
> Could not find com.example:lib:1.0.
  Searched in the following locations:
    - https://repo.maven.apache.org/maven2/com/example/lib/1.0/lib-1.0.pom
    - https://plugins.gradle.org/m2/com/example/lib/1.0/lib-1.0.pom
  Required by:
      project :app

Common causes

The version does not exist in the searched repositories

The coordinate is real but that specific version was never published to any repository Gradle searched.

The hosting repository is not declared

The artifact lives in a repository absent from repositories {}, so Gradle only searches the wrong places.

How to fix it

Correct the coordinate or add the repository

  1. Read the "Searched in the following locations" URLs.
  2. Fix the version or group/name to one that is actually published.
  3. If the repository is wrong, add the one that hosts the artifact.
build.gradle.kts
dependencies {
    implementation("com.example:lib:1.4.0") // a published version
}

Add the missing repository

If the coordinate exists only in a private or third-party repository, declare it so Gradle searches there.

build.gradle.kts
repositories {
    mavenCentral()
    maven { url = uri("https://maven.internal.example.com/releases") }
}

How to prevent it

  • Verify a version is published before pinning it.
  • Declare every repository your dependencies come from.
  • Use a version catalog so coordinates are centralised and reviewable.

Frequently asked questions

What causes ""Could not find com.example:lib:1.0""?
The coordinate is real but that specific version was never published to any repository Gradle searched.
How do I fix "Could not find com.example:lib:1.0"?
Correct the coordinate or add the repository

Related guides

References

Latchkey auto-heals failures like this one - detected, fixed, and retried without you. Start free → 30-day trial · No credit card