Kotlin "Could not resolve org.jetbrains.kotlin" in CI
Gradle could not download a Kotlin module (stdlib, plugin, or compiler) from the configured repositories. The version does not exist, the repository is missing, or the network blocked the fetch.
What this error means
The build fails during resolution with "Could not resolve org.jetbrains.kotlin:kotlin-stdlib:<version>" or "Could not resolve all artifacts for configuration", naming the Kotlin coordinate.
> Could not resolve org.jetbrains.kotlin:kotlin-stdlib:2.99.0.
> Could not find org.jetbrains.kotlin:kotlin-stdlib:2.99.0.
Searched in the following locations:
- https://repo.maven.apache.org/maven2/org/jetbrains/kotlin/...Common causes
The requested Kotlin version does not exist
A typo or a not-yet-published version means no repository has that kotlin-stdlib or plugin artifact.
A required repository is not declared
The Kotlin artifact lives in a repository (Gradle Plugin Portal, Maven Central) the build did not add, so resolution finds nothing.
How to fix it
Pin a published Kotlin version
- Read the coordinate and version in the "Could not find" line.
- Set the Kotlin plugin and stdlib to a real released version.
- Re-run so the artifact resolves.
plugins {
kotlin("jvm") version "2.0.0"
}Declare the repositories
Ensure Maven Central and, for plugins, the Plugin Portal are configured so Kotlin artifacts can be found.
repositories {
mavenCentral()
}How to prevent it
- Use only Kotlin versions that are actually published.
- Declare
mavenCentral()and the Plugin Portal where needed. - Cache the Gradle dependency directory so transient fetch failures do not repeat.