领域警告:未关闭文件的类型?

时间:2018-11-02 14:18:52

标签: android realm

我正在开发简历,并且已经使用了领域数据库,但是出现以下错误

  

公共类KitabSawti扩展了RealmObject {          ^警告:类型为[[io.realm.activity_drawer_navigation_com_kitabsawticlone_Pojo_KitabSawtiRealmProxy]]的未关闭文件;   这些类型将不会进行注释处理1错误1警告

在我的Java类下面

public class KitabSawti extends RealmObject {
        @SerializedName("Introduction")
        @Expose
        private RealmList<Introduction> introduction = null;
        @SerializedName("Education")
        @Expose
        private List<Education> education = null;
        @SerializedName("Work")
        @Expose
        private List<Work> work = null;
        @SerializedName("Skills")
        @Expose
        private List<Skill> skills = null;
        @SerializedName("Contact")
        @Expose
        private List<Contact> contact = null;

        public RealmList<Introduction> getIntroduction() {
            return introduction;
        }

        public void setIntroduction(RealmList<Introduction> introduction) {
            this.introduction = introduction;
        }

        public List<Education> getEducation() {
            return education;
        }

        public void setEducation(List<Education> education) {
            this.education = education;
        }

        public List<Work> getWork() {
            return work;
        }

        public void setWork(List<Work> work) {
            this.work = work;
        }

        public List<Skill> getSkills() {
            return skills;
        }

        public void setSkills(List<Skill> skills) {
            this.skills = skills;
        }

        public List<Contact> getContact() {
            return contact;
        }

        public void setContact(List<Contact> contact) {
            this.contact = contact;
        }

    }

1 个答案:

答案 0 :(得分:1)

以下内容可能会有所帮助。

  1. 如果List<Education>, List<Work>, List<Skill>, List<Contact>是教育,工作,技能和联系为RealmObject的关系,则可能需要对它们中的每一个使用RealmList <>
  2. 如果它们不是RealmObjects,则可能必须在所有这些属性之上添加@Ignore,以指示领域忽略尝试保留它们。