Android room persistent: AppDatabase_Impl does not exist

前端 未结 21 1406
日久生厌
日久生厌 2020-11-29 01:09

My app database class

@Database(entities = {Detail.class}, version = Constant.DATABASE_VERSION)
public abstract class AppDatabase extends RoomDatabase {

            


        
21条回答
  •  迷失自我
    2020-11-29 01:28

    In my kotlin app, I just added the following line at the top of my build.gradle file :

    apply plugin: 'kotlin-kapt'
    

    And the following line in the dependencies section:

    kapt "androidx.room:room-compiler:2.2.5"
    

    I hope it fixes your issue.

提交回复
热议问题