I have updated kotlin plugin to 1.5.20 and this issue happened. If I return it 1.5.10 all works fine.
Schema export directory is not provided to the annotation processor so we cannot import the schema. To generate auto migrations, you must provide `room.schemaLocation` annotation processor argument AND set exportSchema to true.
public abstract class BatteryInfoDatabase extends androidx.room.RoomDatabase {
I'm using the latest version of Room persistence library alpha 3, because it offers auto migration
def room_version = "2.4.0-alpha03"
implementation("androidx.room:room-ktx:$room_version")
kapt("androidx.room:room-compiler:$room_version")
javaCompileOptions {
annotationProcessorOptions {
arguments += [
"room.schemaLocation":"$projectDir/schemas".toString()]
}
}