Solving Not Determine Java Version 9-0-1 Gradle Intellij Macosx
Solving “Could not determine Java version from ‘9.0.1’” with Gradle and IntelliJ on MacOSX

Solution To Gradle Error

As I was importing Gradle project to try out Java Spring, I encountered this error:

Gradle complete project refresh failed 

Error:Could not determine java version from 9.0.1.

I found this blog by Johan Haleby¬†on same subject useful. But the solution #1 didn’t work. While I was on Project Structure settings (File -> Project Structure -> Project), I noticed the Project SDK was 9.0. This seemed odd as mine was 9.0.1.

So, I clicked on Edit, which took me to SDKs settings and updated the name to 9.0.1.

Solving Not Determine Java Version 9-0-1 Gradle Intellij Macosx

It worked.

Hope this helps if you are in situation like mine.

Installing Gradle

Just some basic noted on installing Gradle on Mac OS X.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
$ brew update && brew install gradle
$ which gradle
/usr/local/bin/gradle
$ ls /usr/local/Cellar/gradle/4.3.1/

Connecting Gradle & IntelliJ IDEA

While importing a Gradle project, I added following as Gradle path:

/usr/local/Cellar/gradle/4.3.1/libexec/

Then as suggested by various stackoverflow articles, I refreshed Gradle (View -> Tool Windows -> Gradle).


 

Dinker has over a decade of experience in building products across diverse domains as Industrial Automation, Home Automations, Operating Systems, High Energy Particle Physics, Embedded Systems, Online Video Advertising, Messaging and K-12. He also founded Gungroo Software.