I try use room library from google architecture. I write few codes based on the BasicSample from google, but database not created (for my code). Logcat does not contains err
Under the covers, by default, Room uses SQLiteOpenHelper
, much as you might use it directly.
SQLiteOpenHelper
does not create the database when you create the SQLiteOpenHelper
instance. It will do so once you call getReadableDatabase()
or getWriteableDatabase()
.
From a Room standpoint, that means until you perform some concrete operation, such as invoking a @Dao
method that hits the database, your database will not be created.