第一步:
implementation 'org.litepal.android:java:3.0.0'
第二步:创建实体类(表结构)
import org.litepal.crud.LitePalSupport; /** * 对应要素 */ public class FactorSystem extends LitePalSupport {//必须要继承 LitePalSupport private long id; private String code; private String description; private String datatype; private String catalogid; private String modtime; private String anotherid; private boolean deleted; public boolean isDeleted() { return deleted; } public void setDeleted(boolean deleted) { this.deleted = deleted; } public String getAnotherid() { return anotherid; } public void setAnotherid(String anotherid) { this.anotherid = anotherid; } public long getId() { return id; } public void setId(long id) { this.id = id; } public String getModtime() { return modtime; } publi