Android Room SQLite_ERROR no such table

前端 未结 6 1003
旧巷少年郎
旧巷少年郎 2021-02-04 23:35

I\'m trying my hand at using Android Room and after following this tutorial I\'m getting the following error when i try to build the app:

Error:(23, 27) error: The

6条回答
  •  闹比i
    闹比i (楼主)
    2021-02-05 00:20

    If you just added a new table, just update your Database class (That one class extending the RoomDatabase() class) and update the entities annotation

    @Database(entities = [User::class, NewTableHere::class], version = 1)
    abstract class AppDatabase : RoomDatabase() {
    

    Wish it saves you time on searching for answer, happy coding.

提交回复
热议问题