[英]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.