Room cannot find implementation

前端 未结 11 1842
伪装坚强ぢ
伪装坚强ぢ 2020-12-09 07:17

I have a problem with testing a Room database: when I run the test, I get this exception:

java.lang.RuntimeException: cannot find implementation for databa         


        
11条回答
  •  隐瞒了意图╮
    2020-12-09 07:56

    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

提交回复
热议问题