Could not determine java version from '9.0.1' Could not determine java version from '9.0.1' android android

Could not determine java version from '9.0.1'


This issue was in gradle version lower than 4.3, so update your gradle.properties to 4.3 or above:

distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-all.zip

Why this error occur?:Because of you have different JDK on your system than your android-studio JDK version.

Therefore your JDK should be compatible with each other, and by following this way you can manage that:

File -> Other settings -> Default project structure

enter image description here

You can use embedded JDK or use your own.


Also you may have some issues with terminal, and that's belong to a conflict between your multiple JDK.

Solution worked with me is to uninstall the java 9 JDK.


I had this problem on macOS and I solved it by:

Removing the too new java jdk

brew cask uninstall java

And installing an older one

brew tap caskroom/versionsbrew cask install java8

All this handled via Homebrew


You should also delete Java JDK. Just run the following:

  1. cd /Library/Java/JavaVirtualMachines
  2. sudo rm -rf jdk1

Now check typing 'java' in your terminal.

For more references you can look here: https://www.howtogeek.com/230145/how-to-uninstall-java-on-mac-os-x/