Getting IntelliJ to play nice with LibGDX Gradle builds

After running the gdx-setup.jar and importing the Gradle project into IntelliJ IDEA 14.0.2, it wouldn’t (or better put: couldn’t) find the installed Android SDK’s for the Android module. The simple fix for this is to change the version of a classpath dependency in the build.gradle.

Open the build.gradle of the root folder and look for this line:

buildscript {

repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.0.0'
}
}

You’ll need to change the version to 0.14.0 (0.14.2 also seems to work for me) to get IDEA to work.