Similar to: - Intellij 14 the supplied javaHome seems to be invalid - Android Studio - supplied javaHome is not a valid folder
However, I am trying to use
In my case the answers above didn't work. Here's what work for me: I needed to change Gradle JVM to point to the actual JDK: