Could not determine Java version using executable C:\Program Files\Java\jdk-10.0.1\bin\java.exe.

Answered

<alert> new to programming.

I'm trying to build a simple blank android project and I'm encountering that error. I've searched around and the only solution I can find is to downgrade my JDK version. Is there another solution?

1
3 comments

As I see the error is reported when IDE tries to run Gradle using the Java 10 JDK. Please try using latest IDE version from https://www.jetbrains.com/idea/download and Gradle version >=4.7 where related Gradle issue should have been fixed and make sure you have selected this version in File | Settings | Build, Execution, Deployment | Build Tools | Gradle -> Use local gradle distribution option.

4
Avatar
Permanently deleted user

I have encountered this problem trying to import my first Java project. I have followed the instructions from a Udacity tutorial. https://classroom.udacity.com/courses/ud282/ The lesson is Intellij and Debugging. I was trying to import the Tic Tac Toe project.

My Java installation details:

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Windows\System32>java -version
java version "10.0.1" 2018-04-17
Java(TM) SE Runtime Environment 18.3 (build 10.0.1+10)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10.0.1+10, mixed mode)

0
Avatar
Permanently deleted user

The solution was Gradle 4.7.

2

Please sign in to leave a comment.