How to import Gradle Projects in IntelliJ?

I used libGDX for an longer time and now after an reinstallation I want to use it with Gradle.

I downloaded the setup.jar and created an project with it like described here. I imported that into IntelliJ and setted for the core Package the dependency to graddle_wrapper and for the 2nd Package “desktop” to core.
I run build.gradle, without problems.

But still, IntelliJ is not able to recognise the libGDX Packages – they are red.

What do I have todo else in order to get libGDX running? (Or any other Project with Gradle)


Do an Import Project or Open... and navigate to build.gradle file. This should be enough for IntelliJ to figure out the dependencies and set up the project.