August 2025
Intermediate to advanced
270 pages
6h 16m
English
To work with Compose, we need to first update our project’s configuration. Android Studio is integrated tightly with editing Compose files, so there are a few steps to make sure everything works.
First, open libs.versions.toml under the Gradle Scripts directory and make sure Kotlin is set to 2.0.0 or later. This ensures we don’t have to manually check Compose to Kotlin compatibility.[32]
| | [versions] |
| | # ... |
| » | kotlin = "2.x.x" |
| | # ... |
| | |
| | [libraries] |
| | # ... |
| | |
| | [plugins] |
| | # ... |
In the same file, add the Compose Compiler plugin by adding compose-compiler = { id = "org.jetbrains.kotlin.plugin.compose", version.ref = "kotlin" } to the very bottom of the file, under the [plugins] section. ...
Read now
Unlock full access