问题背景:
在新建模块guns-api的时候,复制已有的模块guns-core,
进行修改结构时,
报错:
Module "guns-api" must not contain source root "F:...\guns-api\src\main\java". The root already belongs to module "guns-core"
解决:
Project Structure---->Modules--->
检查的时候发现guns-core模块下面含有guns-api模块的目录内容,
删除guns-core模块下面不属于该模块的目录内容,点右侧的X即可~
****保留只属于该模块自己该有的东西****
![](https://img.haomeiwen.com/i8816575/d8c7473a6bbf83ea.png)
检查一下guns-api模块下的
![](https://img.haomeiwen.com/i8816575/daa606232c0d07ab.png)
就可以啦~
网友评论