(当添加jar时) - 模块“android”不得包含源根 [英] (when adding jar) - Module "android" must not contain source root
问题描述
我正在尝试将gdx-tools.jar添加到IntelliJ中的libGDX项目中。结果:
I'm trying to add gdx-tools.jar to a libGDX project in IntelliJ. The result:
模块android不得包含源根... / android / src。
root已经属于模块android。
Module "android" must not contain source root ".../android/src". The root already belongs to module "android".
这是我试过的:
项目结构>库>新项目库> java>选择gdx-tools.jar>选择模块桌面
project structure > libraries > new project library > java > select "gdx-tools.jar" >select module "desktop"
项目结构>模块>选择桌面>新>罐子或目录>选择gdx-tools.jar>
project structure > modules > select "desktop" > new > jars or directories > select "gdx-tools.jar" >
想法?
推荐答案
只需转到工件设置,模块,来源选项卡,您将看到2个名为gen和gen [generated]的文件夹,删除 gen通过点击它右边的X图标。
Just by going to the Artifacts Settings, Modules, Sources tab, and you will see 2 folders called "gen" and "gen[generated]", delete "gen" by clicking on the X icon to the right of it.
看:
这篇关于(当添加jar时) - 模块“android”不得包含源根的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!