I have started a new sample KMP project, I was gonna build a project include room database. Room version 2.7.0-alpha01 is now support KMP, here is the official documentation. I have added all dependencies to my KMP project as explained here. But can’t build the project for the ANDROID app, IOS is working fine.
libs.versions.toml
[libraries]
room = { module = "androidx:room", version.ref = "roomVersion" }
androidx-room-compiler = { module = "androidx.room:room-compiler", version.ref = "roomVersion" }
[plugins]
room = { id = "androidx.room", version.ref = "roomVersion" }
build.gradle.kts
plugins{
alias(libs.plugins.room)
}
androidMain.dependencies {
implementation(libs.compose.ui.tooling.preview)
implementation(libs.androidx.activity.compose)
implementation(libs.room)
implementation(libs.androidx.room.compiler)
}
When I click the run button and if the configuration is composeApp
I am getting the error below.