Gradle cannot find the Compose compiler plugin when you set up or upgrade a Compose project
Your error
Plugin [id: 'org.jetbrains.kotlin.plugin.compose', version: '1.9.24', apply: false] was not found in any of the following sources:1 more line it can showFix it fast
Most common cause, 1 of 3The project is still on Kotlin 1.9
Raise Kotlin to a 2.x release, then add the plugin with that same version through the catalog.
# gradle/libs.versions.toml
[versions]
kotlin = "2.4.10"
[plugins]
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }Short answer
The Compose Compiler Gradle plugin, id org.jetbrains.kotlin.plugin.compose, only exists for Kotlin 2.0 and newer, and its version must equal your Kotlin version. Asking for it with 1.9.24 fails because no such release was published. Move the project to Kotlin 2.x, give the plugin the same version as the Kotlin plugin, apply it in each Compose module and drop composeOptions.
Which cause do you have?
Find the Kotlin version the build uses and the version requested for the Compose plugin. They must be the same number, and it must start with 2.
grep -rnE "kotlin *=|org.jetbrains.kotlin.(android|plugin.compose)" gradle/libs.versions.toml build.gradle* settings.gradle* app/build.gradle* 2>/dev/nullThen find the line you see in this list and open its fix:
- 1The project is still on Kotlin 1.9
The version in the error starts with 1., for example 1.9.24 - 2The plugin is declared but not applied, or applied without a version
Plugin with id 'org.jetbrains.kotlin.plugin.compose' not found, raised from a module build file - 3Old composeOptions settings are left after the upgrade
The module still has a composeOptions block with kotlinCompilerExtensionVersion after the move to Kotlin 2
What does the error look like?
Plugin [id: 'org.jetbrains.kotlin.plugin.compose', version: '1.9.24', apply: false] was not found in any of the following sources:Plugin with id 'org.jetbrains.kotlin.plugin.compose' not found.
Cause 1 of 3
The project is still on Kotlin 1.9
You seeThe version in the error starts with 1., for example 1.9.24
Check
Android's Compose compiler page says the Gradle plugin is available from Kotlin 2.0 onward. Before 2.0 the compiler was a separate androidx artifact chosen with kotlinCompilerExtensionVersion, so there is nothing for Gradle to download at 1.9.x.
grep -rn kotlinCompilerExtensionVersion app/build.gradle*Fix
Raise Kotlin to a 2.x release, then add the plugin with that same version through the catalog. Kotlin's migration guide covers the step from 1.9.
# gradle/libs.versions.toml
[versions]
kotlin = "2.4.10"
[plugins]
kotlin-android = { id = "org.jetbrains.kotlin.android", version.ref = "kotlin" }
compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" }Verify
Sync Gradle; the plugin resolves and the build reaches compilation.
./gradlew :app:assembleDebugConfirmed by developer.android.com
Cause 2 of 3
The plugin is declared but not applied, or applied without a version
You seePlugin with id 'org.jetbrains.kotlin.plugin.compose' not found, raised from a module build file
Check
The root file should declare the plugin with apply false so the version is known, and each module that uses Compose applies it. A module that applies the id while the root never declared it has no version to resolve.
grep -n "compose" build.gradle.kts
grep -n "compose" app/build.gradle.ktsFix
Declare once at the root, apply in the module. Without a catalog, put the version on the module line or on a classpath entry in the root buildscript.
// build.gradle.kts (root)
plugins {
alias(libs.plugins.compose.compiler) apply false
}
// app/build.gradle.kts
plugins {
alias(libs.plugins.compose.compiler)
}Verify
Gradle sync finishes, and the module's tasks list includes the Kotlin compile tasks with Compose enabled.
./gradlew :app:compileDebugKotlinConfirmed by developer.android.com
Cause 3 of 3
Old composeOptions settings are left after the upgrade
You seeThe module still has a composeOptions block with kotlinCompilerExtensionVersion after the move to Kotlin 2
Check
Kotlin's guide says the Gradle plugin overrides the compiler coordinates that AGP would otherwise add. The kotlinCompilerExtensionVersion line from the 1.9 setup no longer controls anything.
grep -n -A3 composeOptions app/build.gradle*Fix
Remove the composeOptions block. Keep buildFeatures compose = true, and move compiler options into a top-level composeCompiler block.
android {
buildFeatures {
compose = true
}
// composeOptions { kotlinCompilerExtensionVersion = "1.5.14" } <- delete
}
composeCompiler {
reportsDestination = layout.buildDirectory.dir("compose_compiler")
}Verify
A clean build passes and Compose previews render in Android Studio.
./gradlew clean :app:assembleDebugConfirmed by kotlinlang.org
How do I stop it coming back?
- Keep one kotlin version entry in the catalog and point both Kotlin plugins at it with version.ref.
- Upgrade Kotlin and the Compose plugin in one change; never pin them separately.
- Remove migration leftovers such as composeOptions in the same pull request as the upgrade.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Every cause above names the document that confirms it. I have not reproduced this fix on a machine of my own yet, so read it as documented guidance, not a test report. Found a mistake? Tell me.
Which stack is behind this page?
Projects of mine built on the same technologies:
- QistLockA NestJS and React SaaS driving an Android Device Owner agent that locks financed phones when payments lapse.
- Nuclear Home VideoA video-streaming Android app built from scratch, engineered for smooth playback.
- Dispatch ProA real-time logistics platform: Flutter apps, Spring Boot services and a Kafka event pipeline on AWS.