Room cannot find implementation
kapt
is for Kotlin.
First, add:
annotationProcessor "android.arch.persistence.room:compiler:1.0.0"
to your dependencies
closure.
Then, upgrade android.arch.persistence.room:rxjava2
and android.arch.persistence.room:testing
to 1.0.0
instead of 1.0.0-rc1
.
ref: https://developer.android.com/jetpack/androidx/releases/room
for Kotlin change the 'annotationProcessor' keyword to 'kapt' in gradle file.
kapt "android.arch.persistence.room:compiler:1.1.1"
and also add on top of the dependency file
apply plugin: 'kotlin-kapt'
ref: https://developer.android.com/jetpack/androidx/releases/room
If You Use Kotlin sure exists this code in your in grade file.
apply plugin: "kotlin-kapt"
// Room
implementation "androidx.room:room-runtime:$room_version"
kapt "androidx.room:room-compiler:$room_version"
Documentation: https://developer.android.com/jetpack/androidx/releases/room
java.lang.RuntimeException: cannot find implementation for com.example.kermovie.data.repository.local.MoviesDatabase. MoviesDatabase_Impl does not exist
You have to add the following code to your build.gradle:
apply plugin: 'kotlin-kapt'
dependencies {
implementation 'androidx.room:room-runtime:2.3.0'
implementation "androidx.room:room-ktx:2.3.0"
kapt "androidx.room:room-compiler:2.3.0"
}
You may have to change the version when a newer version is available. You can check for a newer version on the following web mvnrepository.com