简体   繁体   中英

Calling an existing realm database in android?

I have an existing database which I converted from CSV to .realm database. Now I need to call that in my Android project. I get issues around schema.

I have been able to reach upto the realm file but then it gives me the following error, that is something related with the model. and If I call deleteMigrationIfNeeded method in realm only then It runs with out error but in doing that I get empty db.

java.lang.RuntimeException: Unable to create application android.search786.apkia.com.MyApplication: io.realm.exceptions.RealmMigrationNeededException: The 'AL_QURAN_TBL' class is missing from the schema for this Realm.

Any Help will be highly appreciated. Thanks!

The error says what is wrong:

The 'AL_QURAN_TBL' class is missing from the schema for this Realm.

Apparently you have that table in your Realm file, but no corrosponding Java model class. Either add this class with the correct fields or a migration step that deletes it from the file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM