I have got the react native installation done but with latest jdk version that is v10.
Now when I try to run the project using the command react-native run-android, I am getting the following error,
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '10'.
I'm pretty much new to the MAC environment, How do I roll back to the previous working version of java in Mac? How I can fix this issue?
As a requirement to run, PSPDFKit for React Native needs the latest stable version of Android Studio. Starting with version 4.2 , Android Studio is now bundled with JDK 11.
React Native requires at least the version 8 of the Java SE Development Kit (JDK). You may download and install OpenJDK from AdoptOpenJDK or your system packager. You may also Download and install Oracle JDK 14 if desired.
Downgrade the Java version. This is a problem with the latest version of java.
You need a change in the Android
Gradle properties file.
PROJECT_PATH/android/gradle/wrapper/gradle-wrapper.properties
Update your distributionUrl to the following
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3-rc-2-all.zip
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