Android Room SQLite_ERROR no such table

Another reason for this error could be the entity is not listed in the AppDatabase.java file:

    @Database(entities = {XEntity.class, YEntity.class, ZEntity.class}, 
version = 1, exportSchema = true)

Make sure you have the latest db file in the databases folder, and if you export your schema, make sure your .json schema file under app\schemas is being properly updated.


It helped me a lot to see the articles. I had this errorDatabase(entities = {Folder.class}, version = 1, exportSchema = false)

just add my other class @Database(entities = {Folder.class, Urls.class}, version = 1, exportSchema = false)


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.


Room names tables the same as their associated entities. In your DAO, TABLE_ITEMS needs to be PermitItem, because your entity is PermitItem. Or, add the tableName property to the @Entity annotation, to tell Room some other name to use for the table.