解决:多模块项目:复制已有模块进行结构修改时报错:Module
2019-02-23 本文已影响0人
Sam_L
问题背景:
在新建模块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即可~
****保留只属于该模块自己该有的东西****

检查一下guns-api模块下的

就可以啦~