【发布时间】:2016-04-28 06:34:05
【问题描述】:
到目前为止,我在我的 android 中使用 Realm
new RealmConfiguration.Builder(this) .build();
我稍后才读到关于添加架构和迁移的可能性。 所以在我的应用程序的新版本中,我想添加迁移功能。 所以我将上面的行改为:
new RealmConfiguration.Builder(this) .schemaVersion(0) .migration(new Migration()) .build();
但现在我得到了错误
IllegalArgumentException: Configurations cannot be different if used to open the same file.
如何在不删除数据库的情况下更改配置
【问题讨论】: