初心不负 2016-10-21 09:11 采纳率: 20%
浏览 3703

关联了greendao的实体类实现serialiazable序列化接口的问题

关联了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;
    }


}

  • 写回答

1条回答 默认 最新

  • zqbnqsdsmd 2016-10-22 08:40
    关注
    评论

报告相同问题?

悬赏问题

  • ¥15 关于#python#的问题:求帮写python代码
  • ¥20 MATLAB画图图形出现上下震荡的线条
  • ¥15 LiBeAs的带隙等于0.997eV,计算阴离子的N和P
  • ¥15 关于#windows#的问题:怎么用WIN 11系统的电脑 克隆WIN NT3.51-4.0系统的硬盘
  • ¥15 来真人,不要ai!matlab有关常微分方程的问题求解决,
  • ¥15 perl MISA分析p3_in脚本出错
  • ¥15 k8s部署jupyterlab,jupyterlab保存不了文件
  • ¥15 ubuntu虚拟机打包apk错误
  • ¥199 rust编程架构设计的方案 有偿
  • ¥15 回答4f系统的像差计算