मैं macOS पर काम कर रहा हूं और अभी शुरुआत कर रहा हूं react-native।
आरंभ करने के लिए पहला कदम है: react-native run-androidया react-native run-ios। लेकिन मुझे यह त्रुटि मिल रही है:
react-native run-android
परिणाम:
Scanning folders for symlinks in /Users/ric/myprojs/albums/node_modules (6ms)
Starting JS server...
Building and installing the app on the device (cd android && ./gradlew installDebug)...
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine java version from '9.0.1'.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html
जब मैं दौड़ता हूं तो यह मुझे मिलता है java --version:
java --version
परिणाम:
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
mbp:albums ric$ java --version
java 9.0.1
Java(TM) SE Runtime Environment (build 9.0.1+11)
Java HotSpot(TM) 64-Bit Server VM (build 9.0.1+11, mixed mode)
संपादित करें
मेरा जावा संस्करण:
javac --version
परिणाम:
javac 9.0.1
कुछ पता है इसे कैसे सुधारना?
javac -versionटर्मिनल में भी भाग कर सकते हैं