8

I get an error * What went wrong: Could not determine java version from '10.0.1'.

I want to downgrade to an older version of Java rather than upgrade Gradle. I want to know what is the newest version that React Native works with?

jeancode
  • 5,856
  • 5
  • 12
  • 20
  • I'd try Java 8, worked for me when I got similar error messages. Relevant to this: https://stackoverflow.com/a/48422257/4039886 – klaevv Jun 27 '18 at 02:15

3 Answers3

2

I had to upgrade from version 8 to support latest android sdk

buildToolsVersion = "30.0.2"
minSdkVersion = 21
compileSdkVersion = 31
targetSdkVersion = 31
ndkVersion = "23.1.7779620"

I ended up with Java 11.

If you are using sdkman, run

sdk install java 11.0.11.hs-adp
Adam
  • 3,415
  • 4
  • 30
  • 49
1

java 8, other versions below java10 should work as well

rikongha
  • 309
  • 2
  • 8
-14

Java and React Native has no direct relationship . They are two different things. React Native lets you build mobile apps using only JavaScript. And it lets you build mobile apps for Android devices. Android devices uses an SDK which is based on the Java platform.

React Native apps will work on Android 4.1 (API 16) upwards.

Android 8.1 Oreo (API 27) is the latest stable version available . And Android 9.0 P (API 28) is the upcoming version which is still in beta

Really the fastest way to get around this error is to use JDK 8

user1455719
  • 1,045
  • 4
  • 15
  • 35
  • 1
    But you *can* integrate native (android, Java) code – OneCricketeer Jun 27 '18 at 00:03
  • 1
    Not a great answer. You do need JAVA installed on your machine or you will get "Please set the JAVA_HOME variable in your environment to match the location of your Java installatio" trying to run npm run android. – William R. Marchand May 20 '21 at 02:50