I have gradle 6.0.1 and JDK 13.0.1 installed and tried gradlew setupDecompWorkspace
, but it tells me "Could not determine java version from '13.0.1' ". I've tried to find an answer for a week now and I can't find a solution.
edit: the result of gradlew setupDecompWorkspace --stacktrace
: https://pastebin.com/NFqZpBkG
edit 2: i manually changed the wrapper.properties file and updated my gradle wrapper. Now gradlew setupDecompWorkspace --stacktrace
gives me this:
https://pastebin.com/ubYj4Zq0
I installed jdk 13 and call react-native run-android, then get error above.
Solution: Check if you have jdk 13 here: /Library/Java/JavaVirtualMachines/
ls /Library/Java/JavaVirtualMachines/
Then
cd /Library/Java/JavaVirtualMachines/
sudo rm -rf jdk-13.0.0 // your version
After that reinstall jdk-8 again.
Gradle didn't support Java 13 (without forking the compiler) until Gradle 6.0. You say that is the one you have installed, but you are not supposed to install anything when using the Gradle wrapper. Rather, the wrapper will download the version of Gradle that is defined in the gradle-wrapper.properties
file.
If you run gradlew --version
(and remember to use the 'w' version), there is a good chance you will see an older version. If so, either upgrade the wrapper with gradle wrapper --gradle-version 6.0.1 --distribution-type all
(or newer), or downgrade Java.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With