Pick the fix
After upgrading to Kotlin 2.x, the build fails with a Compose compiler version error. What's the fix?
Hint 1 of 1
Where does the Compose compiler come from in Kotlin 2?
Choose an answer, then open Show answer below to check it.
Show answer
Answer: A Apply the org.jetbrains.kotlin.plugin.compose plugin and remove kotlinCompilerExtensionVersion
Correct. The Compose compiler now ships with Kotlin as a Gradle plugin.
Why not the others?
- B Pin the old Compose compiler extension version. Old extension versions don't support Kotlin 2.
- C Downgrade Compose UI libraries. The UI libraries aren't the problem.
- D Switch Compose off. That's not a fix.