We are in development and db schema changes occur often. Since we are not live, migrations are not needed. I therefor configured Realm as follows:
RealmConfiguration config = new RealmConfiguration.Builder(context)
.deleteRealmIfMigrationNeeded() // todo remove for production
RealmMigration must be provided
We had a similar issue. We solved this by adding
We think the configuration will be set up after Realm is called the first time. This time we don't use any Realm object so there's no exception.