0

I read this in he docs "React Native requires a recent version of the Java SE Development Kit (JDK). Download and install JDK 8 or newer if needed."

So I clicked he link and then I saw the below page. My first question was "who designed this developer experience", which was quickly followed by another question "which one of these links should I click".

Any suggestions?

enter image description here

A.com
  • 1,466
  • 4
  • 19
  • 31

2 Answers2

2

I wouldn't suggest downloading any of these if you have no specific need to use Java itself. Download and install Android Studio, which will automatically configure a JDK for you if there isn't an appropriate one on your system. This should be perfectly adequate for any of React Native's needs.

Jules
  • 14,841
  • 9
  • 83
  • 130
  • hmm... that's odd. It seems to suggest you download it here: https://facebook.github.io/react-native/docs/getting-started.html#java-development-kit – A.com Jun 10 '18 at 23:52
  • Technically you don't need android studio, just the Android SDK, to use react native, so they're giving you the smallest way of installing everything. But installing it via Android Studio is the easiest option. – Jules Jun 10 '18 at 23:54
  • Great. Thanks brother. – A.com Jun 10 '18 at 23:55
1

As it is mentioned in the documentation

If you already have a JDK on your system, make sure it is version 8 or newer.

So java version has to be jdk 8 not less than this.But i tried installing jdk 10 there are still some issues with it and i ran into several problems. So i have to roll back to jdk 8

Karan sharma
  • 1,511
  • 1
  • 13
  • 37
  • It's funny how the docs say "version 8 or newer" when they actually mean version 8. Version 9 and version 10 aren't compatible. https://github.com/facebook/react-native/issues/17688 - https://github.com/facebook/react-native/issues/16536. I like the solution from @Jules above. Android Studio uses version 8. Keep in mind if you want to use react-native run-android with this approach you will need to change some of the configuration noted in the docs: https://stackoverflow.com/questions/48298910/react-native-java-home-is-not-set-and-no-java-command-could-be-found-in-your – colemerrick Jun 11 '18 at 22:42