Android room persistent: AppDatabase_Impl does not exist

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

    Changing the dependencies in my gradle file did'nt help me in fixing the error.I had missed this Database annotation in class where Room database was initialized which was causing this issue.

    @Database(entities = [UserModel::class], version = 1)

    Ensure that the entity model specified in the annotation above refers to the particular model class

提交回复
热议问题