I'm trying to complete one codelab in which you mu...
# compose
p
I'm trying to complete one codelab in which you must add Room to a project from scratch, and I'm having problems with the first step, can't add the dependencies. Here is the official guide: https://developer.android.com/jetpack/androidx/releases/room#kts
Supposedly you must add these dependencies:
Copy code
val room_version = "2.6.1"
implementation("androidx.room:room-runtime:$room_version")
annotationProcessor("androidx.room:room-compiler:$room_version")
// To use Kotlin annotation processing tool (kapt)
kapt("androidx.room:room-compiler:$room_version")
// To use Kotlin Symbol Processing (KSP)
ksp("androidx.room:room-compiler:$room_version")
// optional - Kotlin Extensions and Coroutines support for Room
implementation("androidx.room:room-ktx:$room_version")
// optional - RxJava2 support for Room
implementation("androidx.room:room-rxjava2:$room_version")
// optional - RxJava3 support for Room
implementation("androidx.room:room-rxjava3:$room_version")
// optional - Guava support for Room, including Optional and ListenableFuture
implementation("androidx.room:room-guava:$room_version")
// optional - Test helpers
testImplementation("androidx.room:room-testing:$room_version")
// optional - Paging 3 Integration
implementation("androidx.room:room-paging:$room_version")
Also I added this to the plugin block as the guide recommends:
Copy code
plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.jetbrains.kotlin.android)

    //added kapt and ksp plugins
    kotlin("kapt") version "2.0.0"
    id("com.google.devtools.ksp") version "2.0.0-1.0.21"
}
But something is wrong because I have
kapt
and
ksp
words in red in the dependencies block and I got this error:
Copy code
Error resolving plugin [id: 'org.jetbrains.kotlin.kapt', version: '2.0.0']
> The request for this plugin could not be satisfied because the plugin is already on the classpath with an unknown version, so compatibility cannot be checked.