Android Room Persistence library and Kotlin

前端 未结 6 728
迷失自我
迷失自我 2020-12-03 04:34

I am trying to write a simple app using Kotlin and Room Persistence Library. I followed the tutorial in the Android Persistence codelab.

Here is my AppDatabase<

6条回答
  •  一个人的身影
    2020-12-03 04:46

    In my case, in build.gradle, when you have "annotationProcessor" you need to duplicate with "kapt" and it works.

    compile "android.arch.persistence.room:runtime:$room_version"
    annotationProcessor "android.arch.persistence.room:compiler:$room_version"
    kapt "android.arch.persistence.room:compiler:$room_version"
    

提交回复
热议问题