Android Gradle project fails

Answered

I've just installed IDEA 15.0.3 on OSX 10.10.5 and created a new Android-Gradle project. Without changing anything I get this error:

Gradel project sync failed:

Error:The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: /Users/clyde/dev/tools/android-sdk-mac_x86/bin/java

How do I fix this?

5 comments
Comment actions Permalink

There is a related bug reported at https://youtrack.jetbrains.com/issue/IDEA-148259 . Please follow it for updates.

0
Comment actions Permalink

So is there any work-around? Or is Android-Gradle support in IDEA simply broken?

0
Comment actions Permalink

Does it help if you add Java SDK to IntelliJ IDEA: https://www.jetbrains.com/idea/help/configuring-global-project-and-module-sdks.html#platform_sdk , restart IDE and try to create Android-Gradle project?

0
Comment actions Permalink

No, I already have SDKs configured in Platform Settings/SDKs.

0
Comment actions Permalink

you need to open gradle settings after the project creation and set the correct Gradle JVM and then you should be able to sync the project from gradle

0

Please sign in to leave a comment.