多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法

Posted Maynor的大数据奋斗之路

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法相关的知识,希望对你有一定的参考价值。

多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法

从Project Structure里添加模块,完了点击Apply时弹出提示:

Module “paycode”
must not contain source root “D:\\SourceProject\\pay2.0\\gsd\\pay-code\\sit\\src\\mrurmapp\\src\\main\\java”.
The root already belongs to module “mrurmapp”

意思是:paycode这个模块不能包含source root “D:\\SourceProject\\pay2.0\\gsd\\pay-code\\sit\\src\\mrurmapp\\src\\main\\java”.这个source root已经属于mrurmapp这个模块了。

重新导入模块,尝试用其他的选项,发现都不行。

困扰了我好长时间。结果,从Project Structure现有的modules列表里,发现存在paycode这个模块。这是个外包项目,工程比较繁多,paycode本身不是一个module,所以,把它去掉就可以导入mrurmapp了。(在modules列表里,直接输入要查找的module的名字的关键字,支持检索)

以上是关于多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法的主要内容,如果未能解决你的问题,请参考以下文章

多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法

多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法

多模块项目提示“Module ** must not contain source root **. The root already belongs to module **”的解决办法

thinkphp6.0 多应用模块下提示控制器不存在

Spring boot 打包为war包报错:提示缺少web.xml

多模块下的ConfigurationProperties