想问一下 android大神们, 以下这个问题怎么解决,急急急

Error:FAILURE: Build failed with an exception.

  • What went wrong: Circular dependency between the following tasks: :mod_common_ui:generateDebugRFile +--- :mod_common_ui:generateDebugRFile (*) --- :mod_me:generateDebugRFile +--- :mod_common_ui:generateDebugRFile (*) --- :mod_me:generateDebugRFile (*)

(*) - details omitted (listed previously)

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

  • Get more help at https://help.gradle.org

BUILD FAILED in 3s

gradle脚本,编译打包是把整个打包apk的任务,细分为一个一个粒度很小的任务(task),
比如有:taskA、taskB,taskC,
taskB依赖taskA的结果,taskC依赖taskB的结果。
那么在执行taskC的时候,gradle脚本会自动分析task的依赖关系。并按照依赖顺序执行执行task
你这个是存在task的循环依赖了,就好比编程中的 对象循环引用,不被gc,导致内存泄漏。当然现在的编译器也能够分析出对象循环依赖的问题。
可能是你用的gradle脚本版本的问题,试一试换一下gradle插件版本。