Room + cannot find implementation DB + DB_Impl does not exist

后端 未结 1 1480
情话喂你
情话喂你 2021-01-07 19:13

I am getting following error while running application

java.lang.RuntimeException: cannot find implementation for com.abc.db.abdDB. abcDB_Impl does not exist         


        
相关标签:
1条回答
  • 2021-01-07 19:37

    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 "androidx.room:room-runtime:2.0.0-alpha1"
        kapt "androidx.room:room-compiler:2.0.0-alpha1"
    
    0 讨论(0)
提交回复
热议问题