React Native error: "Could not determine java version from '9.0.1'."
In your PROJECT_PATH/android/gradle/wrapper/gradle-wrapper.properties
file, update your distributionUrl
to the following:
distributionUrl=https\://services.gradle.org/distributions/gradle-5.0-all.zip
See related gradle distributions documentation
Really the fastest way to get around this error is to use JDK 8. Except when you really need to use JDK9.
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
Don't forget to change your enviroment variable JAVA_HOME to the new JDK version!
Make sure that you have JDK8
installed and then set JAVA_HOME
into JDK8
for example:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_151.jdk/Contents/Home
or use .bash_*
files to set this variable