If you still having issues and you installed latest Android studio (LadyBug) and created a new project and wish to use room library you will need to migrate from kapt to ksp. You can read about it here https://developer.android.com/build/migrate-to-ksp Basically you will need to follow the following steps:
add the following line into Project module build.gradle.kts in plugins section
id("com.google.devtools.ksp") version "2.0.21-1.0.27" apply false
add the following line into Module build.gradle.kts in plugins section
id("com.google.devtools.ksp")
you will be required to update the kotlin version in libs.versions.toml from 1.9.24 to 2.0.21 (maybe there will be a newer version by the time you will see this solution, android studio will inform you which version you need to update in the console after syncing the project).
sync the project, it should work after that