I'm trying to add gdx-tools.jar to a libGDX project in IntelliJ. The result:
Module "android" must not contain source root ".../android/src". The root already belongs to module "android".
This is what I've tried:
project structure > libraries > new project library > java > select "gdx-tools.jar" >select module "desktop"
project structure > modules > select "desktop" > new > jars or directories > select "gdx-tools.jar" >
Ideas?
simple 'delete my_project.iml file and import project once again using File->New->Project From Existing Sources'
I solve in with
Deletion both gen and gen [generated] from Source Folder.
I solved the problem by simply renaming the project. Right click on the project, then click refactor.
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.
look:
I had same problem. Solved it by completely deleting project, then clone it back from GIT.
I fixed the issue by deleting .iml files of modules causing the issue.