آموزش جاوااسکریپت › انجمن ها › react native › اجرای react-native روی جنی موشن › پاسخ به: اجرای react-native روی جنی موشن
در ضمن برای اچرای روی گوشی یا جنی موشن هم ارور زیر را میدهد
info Running jetifier to migrate libraries to AndroidX. You can disable it using “–no-jetifier” flag.
Jetifier found 903 file(s) to forward-jetify. Using 8 workers…
info Starting JS server…
‘adb’ is not recognized as an internal or external command,
operable program or batch file.
info Launching emulator…
error Failed to launch emulator. Reason: No emulators found as an output of emulator -list-avds
.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app…
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files (x86)\Java\jdk1.6.0_45
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at makeError (D:\dev\project\SellMe\node_modules\execa\index.js:174:9)
at D:\dev\project\SellMe\node_modules\execa\index.js:278:16
at processTicksAndRejections (internal/process/task_queues.js:97:5)
at async runOnAllDevices (D:\dev\project\SellMe\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:5)
at async Command.handleAction (D:\dev\project\SellMe\node_modules\react-native\node_modules\@react-native-community\cli\build\index.js:186:9)
info Run CLI with –verbose flag for more details.
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! SellMe@0.0.1 android: react-native run-android
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the SellMe@0.0.1 android script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\sayan\AppData\Roaming\npm-cache\_logs\2021-04-12T18_38_21_958Z-debug.log