Could not determine java version from '13.0.1'

jaliho picture jaliho · Nov 20, 2019 · Viewed 12.8k times · Source

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

Answer

Tuan Nguyen picture Tuan Nguyen · Jan 1, 2020

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.