当前位置:网站首页>【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’库中,但是依赖的BaseModule中明明有引入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"))
边栏推荐
- 6-12 二叉搜索树的操作集(30分)
- L2-035 完全二叉树的层序遍历
- 钻石价格预测的ML全流程!从模型构建调优道部署应用!
- FPGA工程师面试试题集锦91~100
- 6-11 Preorder output leaf nodes (15 points)
- [教你做小游戏] 斗地主的手牌,如何布局?看25万粉游戏区UP主怎么说
- When selecting a data destination when creating an offline synchronization node - an error is reported in the table, the database type is adb pg, what should I do?
- 剑指 Offer II 034. 外星语言是否排序-辅助数组法
- FPGA:基础入门按键控制蜂鸣器
- flex&bison系列第一章:flex Hello World
猜你喜欢
Three schemes of SQL query across the table

【深度学习前沿应用】图像风格迁移

CSV(Comma-Separate-Values)逗号分隔值文件

Major upgrade of MSE Governance Center - Traffic Governance, Database Governance, Same AZ Priority
[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

云渲染的应用正在扩大,越来越多的行业需要可视化服务

类型和id对应的两个数组

JVM内存和垃圾回收-11.执行引擎

优化是一种习惯●出发点是'站在靠近临界'的地方

Introduction to 3 d games beginners essential 】 【 modeling knowledge
随机推荐
关于奉加微PHY62xx系列如何选型?PHY6222/PHY6212/PHY6252
【知识分享】在音视频开发领域中SEI到底是个啥?
【HMS core】【FAQ】AR Engine、Analytics Kit、Video Editor Kit、Image Kit、Map Kit典型问题合集2
剑指 Offer II 042. 最近请求次数-队列法
【初学必备】3d游戏建模入门基础知识
MySQL 查询出重复出现两次以上的数据 - having
「POJ 3666」Making the Grade 题解(两种做法)
补坑求逆序对
MySql main performance indicators description
1720. 解码异或后的数组
LeetCode·27.移除元素·双指针
Major upgrade of MSE Governance Center - Traffic Governance, Database Governance, Same AZ Priority
TikTok选品有什么技巧?
Redis 持久化机制
Today's bug, click on the bug that the Windows dynamic wallpaper disappears in the win10 taskbar, and no solution has been found yet.
The Biotin-PEG3-Br/acid/NHS ester/alcohol/amine collection that everyone wants to share
[Go WebSocket] 你的第一个Go WebSocket服务: echo server
When selecting a data destination when creating an offline synchronization node - an error is reported in the table, the database type is adb pg, what should I do?
[TAPL] 概念笔记
剖析Framework面试—>>>冲击Android高级职位