繁体   English   中英

在android中调用现有的realm数据库?

[英]Calling an existing realm database in android?

我有一个现有的数据库,我从CSV转换为.realm数据库。 现在我需要在我的Android项目中调用它。 我在架构方面遇到问题。

我已经能够达到领域文件,但它给了我以下错误,这是与模型相关的东西。 如果我只在域中调用deleteMigrationIfNeeded方法然后它运行时出错,但在这样做我得到空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.

任何帮助将受到高度赞赏。 谢谢!

错误说明错了:

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

显然,您的Realm文件中有该表,但没有相应的Java模型类。 使用正确的字段添加此类,或者从文件中删除它的迁移步骤。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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