zl程序教程

您现在的位置是:首页 >  其他

当前栏目

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

2023-04-18 12:57:44 时间

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

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

Module “paycode”
 must not contain source root “D:SourceProjectpay2.0gsdpay-codesitsrcmrurmappsrcmainjava”.
 The root already belongs to module “mrurmapp”

意思是:paycode这个模块不能包含source root “D:SourceProjectpay2.0gsdpay-codesitsrcmrurmappsrcmainjava”.这个source root已经属于mrurmapp这个模块了。

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

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