Max
02/19/2024, 3:19 PMandroidMain.dependencies {
// ...
implementation("androidx.lifecycle:lifecycle-viewmodel-ktx:2.6.2")
implementation("androidx.lifecycle:lifecycle-runtime-compose:2.6.2")
implementation(libs.androidx.lifecycle.viewmodel.compose)
}
The first two dependencies use legacy syntax while the third uses gradle version catalogs. When pasting the code in like this, the IDEs auto converting (via the tooltip) of the first two dependencies to version catalogs fails somehow. I had to first paste in the first two dependencies, let the IDE do its magic and then paste in the third -> followed by a Gradle Sync.
This could probably be solved by either specifying all three dependencies in the docs via version catalogs, or none. Just an FYI, maybe it helps someone.tapchicoma
02/19/2024, 5:22 PMAleksey Zamulla
02/20/2024, 9:26 AM