You are currently viewing Solving “Could not determine Java version from ‘9.0.1’” with Gradle and IntelliJ on 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).


 


A Request: Support Us

Time and effort has gone into the creation of this content. Your encouragement and support enables more free tools and useful content.


Dinker Charak

Dinker has over a decade of experience in building products across diverse domains such as Industrial Automation, Home Automation, Operating Systems, High Energy Particle Physics, Embedded Systems, Online Video Advertising, Messaging, K-12 education and Private Banking. He also founded Gungroo Software. He books '#ProMa: Product Management Tools, Methods & Some Off-the-wall Ideas' and 'The Neutrinos Are Coming and Other Stories' are available globally. He also manages adbhut.in, an Indian Sci-fi portal.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.