当前位置:网站首页>【greenDao】Cannot access ‘org.greenrobot.greendao.AbstractDaoSession‘ which is a supertype of
【greenDao】Cannot access ‘org.greenrobot.greendao.AbstractDaoSession‘ which is a supertype of
2022-08-10 18:39:00 【guangdeshishe】
问题
Cannot access ‘org.greenrobot.greendao.AbstractDaoSession’ which is a supertype of ‘com.xxx.greendao.entity.DaoSession’. Check your module classpath for missing or conflicting dependencies
分析
根据提示,意思是说找不到“DaoSession
”的父类“AbstractDaoSession
”,而AbstractDaoSession
是在’org.greenrobot:greendao:3.3.0’库中,但是依赖的Base
Module中明明有引入implement 'org.greenrobot:greendao:3.3.0'
,这里涉及到引入依赖库implement
和api
的区别:
implement 'org.greenrobot:greendao:3.3.0'
:只有当前Module可引用到里面的类- 假如greenDao是接入到BaseModule中,而AppModule引用BaseModule,这个时候使用
implement
引入greenDao则在AppModule中是找不到greenDao库中相关类的
- 假如greenDao是接入到BaseModule中,而AppModule引用BaseModule,这个时候使用
api 'org.greenrobot:greendao:3.3.0'
:当前Module和引用了当前Module的Modul都可以使用相关类
解决办法
- 将BaseModule中的
implement 'org.greenrobot:greendao:3.3.0'
改成api 'org.greenrobot:greendao:3.3.0'
- 在AppModule中引用BaseModule模块时,也要使用
api(project(":base"))
替换implementation(project(":base"))
边栏推荐
- 【Knowledge Sharing】What is SEI in the field of audio and video development?
- 小分子PEG CAS:1352814-07-3生物素-PEG6-丙酸叔丁酯
- Scala中使用 Jackson API 进行JSON序列化和反序列化
- 三星Galaxy Watch5产品图片流出 非Pro表款亦有蓝宝石加持
- stm32中的CAN通讯列表模式配置解析与源码
- dumpsys meminfo 详解
- FPGA工程师面试试题集锦81~90
- CEO对今天的CIO们真正的要求是什么?
- 6-11 先序输出叶结点(15分)
- 位算符详解 按位与、或、异或、取反、左移、右移
猜你喜欢
Keras深度学习实战(17)——使用U-Net架构进行图像分割
工业基础类—利用xBIM提取IFC几何数据
API 网关的功能
云渲染的应用正在扩大,越来越多的行业需要可视化服务
[Image dehazing] Image dehazing based on color attenuation prior with matlab code
postgis空间数据导入及可视化
MSE 治理中心重磅升级-流量治理、数据库治理、同 AZ 优先
消息队列初见:一起聊聊引入系统mq 之后的问题
漫谈测试成长之探索——测试文档
[Teach you how to do mini-games] How to lay out the hands of Dou Dizhu?See what the UP master of the 250,000 fan game area has to say
随机推荐
第14章_MySQL事务日志
Rider调试ASP.NET Core时报thread not gc-safe的解决方法
面试题 04.12. 求和路径-dfs+辅助数组法
剑指 Offer 27. 二叉树的镜像(翻转二叉树)
Keras deep learning combat (17) - image segmentation using U-Net architecture
工业基础类—利用xBIM提取IFC几何数据
状态压缩dp蒙德里安的梦想
我们用48h,合作创造了一款Web游戏:Dice Crush,参加国际赛事
StoneDB 文档捉虫活动第一季
FPGA工程师面试试题集锦71~80
请问下在datastream中用flinkcdc怎么设置jdbc的参数useSSL=false呀
JVM基本结构
openssl查看证书信息
120Hz OLED拒绝“烧屏”!华硕无双全能轻薄本
友邦人寿可观测体系设计与落地
Consul Introduction and Installation
RS-485多主机通信的组网方式评估
Unity_Stack<T>()的应用(多个次级界面后的返回逻辑)
FPGA:从0开始(安装开发环境)加破解
西安Biotin-PEG8-IA_IA-PEG8-生物素供应商