以下仅做参考,自用快速集成
数据库
主要依赖xml 配置
LitePal compile 'org.litepal.android:core:1.6.1' assets 新增xml文件配置 Application注册 LitePal.initialize(this);
https://www.jianshu.com/p/8035eb5da7a2
配置和实现方式类似GreenDao
ormlite 创建Helper类 继承基础类即可 基础类必须继承 OrmLiteSqliteOpenHelper
类注释直接生成对应的数据库处理模块
GreenDao 指定目录即可 集成DaoMaster.OpenHelper 新增DaoTool 工具类
greendao {
schemaVersion 1
daoPackage 'com.sunchip.bluetoothpr.bean.db'
targetGenDir 'src/main/java'
}