DoKit
DoKit copied to clipboard
DoKit数据库与项目数据库冲突,导致崩溃
项目运行无误,接入DoKit后,某个特定接口直接崩溃。 报错如下: java.lang.IllegalArgumentException: Unable to create converter for StrategyResult<java.util.List<Group>>
初步猜测,Group本身继承自Model,用的ActiveAndroid Group代码如下:
@Table(name = "custom") public class Group extends Model implements Parcelable, Jsonable {
public static final Creator<Group> CREATOR = new Creator<Group>() {
@Override
public Group createFromParcel(Parcel source) {
return new Group(source);
}
@Override
public Group[] newArray(int size) {
return new Group[size];
}
};
@Column(name = "groupName")
public String groupName;
@SerializedName("id")
@Column(name = "groupId")
public int groupId;
查看dokit数据库,发现表字段也有id,网上查看一篇文章说的gson和room id冲突导致崩溃,报Unable to create converter for,所以初步猜测是这个原因?但是还是不明白是什么原因?