当前位置:网站首页>【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"))
边栏推荐
猜你喜欢
Keras deep learning combat (17) - image segmentation using U-Net architecture
MySQL 原理与优化:Update 优化
The servlet mapping path matching resolution
[教你做小游戏] 斗地主的手牌,如何布局?看25万粉游戏区UP主怎么说
IoU、GIoU、DIoU、CIoU四种损失函数总结
stm32中的CAN通讯列表模式配置解析与源码
云渲染的应用正在扩大,越来越多的行业需要可视化服务
如何通过JMobile软件实现虹科物联网HMI/网关的报警功能?
钻石价格预测的ML全流程!从模型构建调优道部署应用!
【HMS core】【FAQ】Account Kit、push Kit典型问题合集1
随机推荐
MySql主要性能指标说明
QoS服务质量八拥塞避免
websocket校验token:使用threadlocal存放和获取当前登录用户
第四届“传智杯”全国大学生IT技能大赛(初赛A组) 补题
FPGA工程师面试试题集锦61~70
破解校园数字安全难点,联想推出智慧教育安全体系
Redis command---key chapter (super complete)
开源一夏 | mysql5.7 安装部署 -二进制安装
[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
2816. 判断子序列(双指针)
[Go WebSocket] 你的第一个Go WebSocket服务: echo server
弘玑Cyclone与风变科技达成战略合作:优势互补聚焦数字化人才培养
开发模式对测试的影响
6-12 二叉搜索树的操作集(30分)
Interface test advanced interface script using -apipost (pre/post execution script)
Intelligent bid strategy how to affect advertising effectiveness?
Today's bug, click on the bug that the Windows dynamic wallpaper disappears in the win10 taskbar, and no solution has been found yet.
【OpenCV】-物体的凸包
DefaultSelectStrategy NIOEventLoop执行策略
服务器上行带宽和下行带宽指的是什么