error:Circular dependency between the following tasks

多个module开发遇到个错误:

Circular dependency between the following tasks:
:base:generateDebugRFile
+--- :base:generateDebugRFile (*)
+--- :module_transmission:generateDebugRFile
|    +--- :base:generateDebugRFile (*)
|    +--- :module_transmission:generateDebugRFile (*)
|    \--- :ui:generateDebugRFile
|         +--- :base:generateDebugRFile (*)
|         +--- :module_transmission:generateDebugRFile (*)
|         \--- :ui:generateDebugRFile (*)
\--- :ui:generateDebugRFile (*)

(*) - details omitted (listed previously)

这个错误问题的原因是:循环引用造成的错误,也就是A引用了B,B也引用了A
Android 要求要单向引用,如果有需求需要相互调用,建议再抽象一个一个module进行引用。

©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • Android 自定义View的各种姿势1 Activity的显示之ViewRootImpl详解 Activity...
    passiontim阅读 173,455评论 25 708
  • 用两张图告诉你,为什么你的 App 会卡顿? - Android - 掘金 Cover 有什么料? 从这篇文章中你...
    hw1212阅读 12,960评论 2 59
  • 专业考题类型管理运行工作负责人一般作业考题内容选项A选项B选项C选项D选项E选项F正确答案 变电单选GYSZ本规程...
    小白兔去钓鱼阅读 9,058评论 0 13
  • 1,第一只精灵 今天小奥奇来到到了奥奇学院,今天他要领取他的第一只...
    姚函辰阅读 971评论 0 3
  • Source code: Lib/asyncio/tasks.py Source code: Lib/asynci...
    yutiansut阅读 236评论 0 0