(添加 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" >
想法?
推荐答案
只需转到 Artifacts Settings、Modules、Sources 选项卡,您将看到 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屋!