You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
W/SQLiteAssetHelper: Can't downgrade read-only database from version 2 to 1
I solve this problem by using read-write database instead or you can change database version to 1.
Hello! Trying to create pre-populated database.
My Database
@Database(entities = {Series.class}, version = 2, exportSchema = false)
...
public static AppDatabase getDatabase(Context context) {
if (INSTANCE == null) {
synchronized (AppDatabase.class) {
if (INSTANCE == null) {
INSTANCE = RoomAsset.databaseBuilder(context,
AppDatabase.class, DB_NAME)
.allowMainThreadQueries()
.build();
}
}
}
return INSTANCE;
}
Problem is:
`I/SQLiteAssetHelper: successfully opened database cymbalsbase.db
W/SQLiteAssetHelper: Can't downgrade read-only database from version 2 to 1:
Upgrading database cymbalsbase.db from version 2 to 1...
missing database upgrade script: databases/cymbalsbase.db_upgrade_0-1.sql
E/SQLiteAssetHelper: no upgrade script path from 2 to 1
D/AndroidRuntime: Shutting down VM
E/AndroidRuntime: FATAL EXCEPTION: main`
What can i do?
The text was updated successfully, but these errors were encountered: