Reputation: 81
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
Upvotes: 8
Views: 18451
Reputation: 137
I was having the same issue. 1.7.10 forge does not support gradle 6. In the \gradle\wrapper\gradle-wrapper.properties revert the gradle version to what it was before it is something like 4.x. (This is for 1.8.9 not 1.7.10 if it is 3.x maybe try JDK 7 instead of 8 if the same error occurs)
Gradle 4 does not support JDK 13. I am not sure what versions work for gradle 4 as I cannot find the documentation for the supported versions. After some trial and error, I found JDK 8 works. Download and install here.
After the installer is complete, it won't just work. You will need to set "JAVA_HOME". Go to your environment variabes (Control Panel\System and Security\System\Advanced system settings\Advanced\Environment Variables...) If "JAVA_HOME" doesn't exist in the system variables, create it. Call it "JAVA_HOME" and set the value to "C:\Program Files\Java\jdk1.8.0_241" if you used the installer I linked. After you have done this, click ok, ok, ok and close the control panel.
You are almost done! Now all you have to do is restart your computer and it should work. If it doesn't comment on this answer and @ me. Hope it works.
Note: I recommend to use IntelliJ for modding and once you have decompiled, open the build.gradle with IntelliJ. Wait for it to load and then go back to your command prompt and type "gradlew genIntellijRuns" (as seen in github guide for modding)and now you are ready to start coding!
Upvotes: 0
Reputation: 2607
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.
Upvotes: 3
Reputation: 7600
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.
Upvotes: 2