idea多Module出现依赖循环问题----aAnnotation processing is not supported for module cycles

痛定思痛。 2022-06-17 08:38 555阅读 0赞

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…发现是循环依赖。

Center

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

Center 1

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

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

发表评论

表情:
评论列表 (有 0 条评论,555人围观)

还没有评论,来说两句吧...

相关阅读