IDEA多模块项目导入模块出现Module 'someModule' must not contain source root. The root already belongs to module 'anotherModule'解决

2022-05-29 1186点热度 0人点赞 0条评论

Inteillj IDEA在导入模块出现这个错误:

Module 'someModule' must not contain source root. The root already belongs to module 'anotherModule'

出现这个错误的原因,可能是:

多模块Maven项目,父模块parent目录不能有src的code。打开Project Structure,找到parent父模块,查看下面的的 Source Folders看看是否把要导入或者添加的module的给加载进来了。删掉就可以了。

如图所示(删除后便可以了):

admin

这个人很懒,什么都没留下

文章评论

您需要 登录 之后才可以评论