My app database class
@Database(entities = {Detail.class}, version = Constant.DATABASE_VERSION)
public abstract class AppDatabase extends RoomDatabase {
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