0%

idea多Module出现依赖循环问题

idea循环依赖aAnnotation processing is not supported for module cycles.

  1. 错误现象
    Error:java: Annotation processing is not supported for module cycles. Please ensure that all modules from cycle [book-rpc,book-api] are excluded from annotation processing

通过Analyze->Analyze Module Dependencies…发现是循环依赖。

2.解决办法
先是找到这个依赖,删掉相关的(右击第一个module选中open module setting–>Dependencies)

然后在book-api中的pom.xml找到第二个这个依赖,删掉,重新import Changes need to be imported

如果仅仅删除module中的Dependencies中的相关依赖,有可能没有解决根本性的问题,所以要看一下pom.xml中是否已经存在了相关依赖

Welcome to my other publishing channels