I can not get rid of the error.

open class Book( var bookAuthor: String = "" ) : RealmObject() { } override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.activity_main) Realm.init(this) val realm:Realm = Realm.getDefaultInstance() realm.beginTransaction() realm.createObject(Book::class.java) .bookAuthor = "Test" realm.commitTransaction() realm.close() } ext.kotlin_version = '1.3.0' dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "io.realm:realm-gradle-plugin:5.9.0" } apply plugin: 'com.android.application' apply plugin: 'kotlin-android' apply plugin: 'kotlin-android-extensions' apply plugin: 'kotlin-kapt' apply plugin: 'realm-android' 

I tried to change the version of the cauldron, the version of realm.
Did through the migration file

 override fun migrate(realm: DynamicRealm, _oldVersion: Long, newVersion: Long) { val schema: RealmSchema = realm.schema schema.create("Book") .addField("bookAuthor", String::class.java) } 

I opened the database through Realm Studio there is a Book scheme, deleted it, recreated it, created it manually, which I did not do ... I don't understand why it is so difficult

    0