gpt4 book ai didi

android - Realm 警告 : Unclosed files for the types?

转载 作者:行者123 更新时间:2023-11-29 23:28:27 26 4
gpt4 key购买 nike

我正在开发 cv 并使用了 Realm 数据库,但出现以下错误

public class KitabSawti extends RealmObject { ^ warning: Unclosed files for the types '[io.realm.activity_drawer_navigation_com_kitabsawticlone_Pojo_KitabSawtiRealmProxy]'; these types will not undergo annotation processing 1 error 1 warning

在我的 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. 如果List<Education>, List<Work>, List<Skill>, List<Contact>是 Education、Work、Skill 和 Contact 是 RealmObject 的关系,您可能需要为它们中的每一个使用 RealmList<>
  2. 如果它们不是 RealmObjects,您可能必须在所有这些属性之上添加 @Ignore 以指示 realm 忽略尝试持久化它们。

关于android - Realm 警告 : Unclosed files for the types?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/53120293/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com