[Bug]: Hello, do I have bugs collected from an online project? #7747
Labels
More-information-needed
More information needed from the reporter. The issue will autoclose if no more information is given.
O-Community
Waiting-For-Reporter
Waiting for more information from the reporter before we can proceed
What happened?
io.realm.exceptions.RealmFileException: Opening Realm files of format version 0 is not supported by this version of Realm (Database has an unsupported version and cannot be upgraded
Repro steps
An error is reported when opening the program initialization configuration
Could you tell me when this error occurred? The database version upgrade is not involved in the use
Version
Android sdk7.0.0版本
What SDK flavour are you using?
Local Database only
What type of application is this?
Other
Client OS and version
Android系统8.0
Code snippets
/**
* 自定义Realm配置
*
* @return
*/
public void setRealmConfig(String dbName) {
MyLog.i(TAG, "RealmUtils.dbName=" + dbName);
RealmConfiguration config = new RealmConfiguration.Builder()
.name(dbName + ".realm")
.encryptionKey(Utils.getRealmKey(REALMKEY)) //设置密钥
.schemaVersion(dbVersion) //版本号 0
.migration(new MyRealmMigration()) //数据库迁移/
// .deleteRealmIfMigrationNeeded()//声明版本冲突时自动删除原数据库,开发时候打开
.build();
Realm.setDefaultConfiguration(config);
MyLog.i(TAG, "config=" + config.getRealmFileName());
realm = Realm.getInstance(config);
}
Stacktrace of the exception/crash you're getting
No response
Relevant log output
No response
The text was updated successfully, but these errors were encountered: