关联了greendao的实体类实现serialiazable序列化接口可以吗,如下,报错如下
First problem:
Pb(96) The serializable class DetailBean does not declare a static final serialVersionUID field of type long (536871008 at line 12
Run gradle with --info for more details
我指定版本序列号好还是保这个错,这个实体类能不能实现序列化接口,
import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Generated;
import org.greenrobot.greendao.annotation.Id;
import java.io.Serializable;
/**
* Created by challenge on 2016/10/20.
*/
@Entity
public class StorageBean implements Serializable {
private static final Long serialVersionUID=1L;
@Id
Long id;
Long ids;
String sourceId;
String picUrl;
String price;
String origin_price;
String description;
String sales;
@Generated(hash = 769782149)
public StorageBean(Long id, Long ids, String sourceId, String picUrl,
String price, String origin_price, String description, String sales) {
this.id = id;
this.ids = ids;
this.sourceId = sourceId;
this.picUrl = picUrl;
this.price = price;
this.origin_price = origin_price;
this.description = description;
this.sales = sales;
}
@Generated(hash = 806242961)
public StorageBean() {
}
public Long getId() {
return this.id;
}
public void setId(Long id) {
this.id = id;
}
public Long getIds() {
return this.ids;
}
public void setIds(Long ids) {
this.ids = ids;
}
public String getSourceId() {
return this.sourceId;
}
public void setSourceId(String sourceId) {
this.sourceId = sourceId;
}
public String getPicUrl() {
return this.picUrl;
}
public void setPicUrl(String picUrl) {
this.picUrl = picUrl;
}
public String getPrice() {
return this.price;
}
public void setPrice(String price) {
this.price = price;
}
public String getOrigin_price() {
return this.origin_price;
}
public void setOrigin_price(String origin_price) {
this.origin_price = origin_price;
}
public String getDescription() {
return this.description;
}
public void setDescription(String description) {
this.description = description;
}
public String getSales() {
return this.sales;
}
public void setSales(String sales) {
this.sales = sales;
}
}