Android room persistent: AppDatabase_Impl does not exist

前端 未结 21 1455
日久生厌
日久生厌 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:37

    if you are using kotlin classes to implement database then use

    apply plugin: 'kotlin-kapt'
    

    and

    kapt "android.arch.persistence.room:compiler:1.1.1"
    

    in your gradle file, it will work.

提交回复
热议问题