마이그레이션을 적용 할 영역 모델이 있습니다. 나는 어떤 값을 얻을 수있는 영역 인스턴스를 사용영역을 마이그레이션 할 수 없습니다.
realmConfiguration = new RealmConfiguration
.Builder(this)
.schemaVersion(0)
.migration(new Migration())
.build();
: 나는 마이그레이션을 적용 할 때 그러나, 나는 내 활동 클래스에서 오류
Configurations cannot be different if used to open the same file.
The most likely cause is that equals() and hashCode() are not overridden in the migration class:
를 얻을로 구성이 설정됩니다.
RealmConfiguration config = new RealmConfiguration.Builder(this)
.schemaVersion(1) // Must be bumped when the schema changes
.migration(new Migration()) // Migration to run
.build();
Realm.setDefaultConfiguration(config);
나는이 전화
:realm = Realm.getDefaultInstance();
내가 오류 위 얻을 그리고 내가 사용하여 마이그레이션을 적용합니다. 마이그레이션을 올바르게 적용하고 있습니까?