(when adding jar) - Module "android" must not contain source root

intellij-idea, jar, libgdx

Solution

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:

Problem

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?

Original source