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

abc32112 picture abc32112 · May 19, 2014 · Viewed 21.9k times · Source

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?

Answer

lucasddaniel picture lucasddaniel · Aug 2, 2014

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: enter image description here