calidion
Cannot create a RoomDatabase without providing a SQLiteDriver via setDriver().
val roomVersion = "2.7.0-alpha12" implementation("androidx.room:room-runtime:$roomVersion") implementation("androidx.sqlite:sqlite-bundled:2.5.0-alpha12") implementation("androidx.sqlite:sqlite-bundled-jvm:2.5.0-alpha12") ksp("androidx.room:room-compiler:$roomVersion")
fun getDatabaseBuilder(): RoomDatabase.Builder<AppDatabase> { val dbFile = File(System.getProperty("java.io.tmpdir"), "my_room.db") return Room.databaseBuilder<AppDatabase>( name = dbFile.absolutePath, ) }
Chrimaeon
return builder // .addMigrations(MIGRATIONS) // .fallbackToDestructiveMigrationOnDowngrade() .setDriver(BundledSQLiteDriver()) .setQueryCoroutineContext(<http://Dispatchers.IO|Dispatchers.IO>) .build()
A modern programming language that makes developers happier.