Room + cannot find implementation DB + DB_Impl does not exist


I am getting following error while running application

java.lang.RuntimeException: cannot find implementation for abcDB_Impl does not exist

My build.gradle has following configuration:

implementation "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"
annotationProcessor "androidx.lifecycle:lifecycle-compiler:2.0.0-alpha1"
implementation ""
annotationProcessor ""

My Database class:

fun getDatabase(context: Context): abcDB? {
        if (dbInstance == null) {
            synchronized( {
                if (dbInstance == null) {
                    dbInstance = Room.databaseBuilder(context.applicationContext,
                  , "abc_db")
        return dbInstance

Does anyone try to use androidX API? Can someone help to find solution for this?


If you use Kotlin, then you have to use kapt instead of annotationProcessor, and must also apply kotlin-kapt plugin.

apply plugin: 'kotlin-android'
apply plugin: 'kotlin-kapt'

dependencies {
    implementation "androidx.lifecycle:lifecycle-extensions:2.0.0-alpha1"
    kapt "androidx.lifecycle:lifecycle-compiler:2.0.0-alpha1"
    implementation ""
    kapt ""

Answered By – EpicPandaForce

This Answer collected from stackoverflow, is licensed under cc by-sa 2.5 , cc by-sa 3.0 and cc by-sa 4.0

Leave a Reply

(*) Required, Your email will not be published