无法启动模拟器React Native安装错误

时间:2019-12-10 11:20:51

标签: react-native react-native-android

我是React Native的新手。我收到此错误。我在安装时可能犯了一些错误。我已遵循react的官方文档:https://facebook.github.io/react-native/docs/getting-started 谁能帮助我纠正我的错误?

  C:\Users\Bhavna\AwesomeProject>npx react-native  run-android

info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
Jetifier found 864 file(s) to forward-jetify. Using 4 workers...
info Starting JS server...
adb server version (32) doesn't match this client (41); killing...
* daemon started successfully
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 not set and no 'java' command could be found in
> your PATH.

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://facebook.github.io/react-native/docs/getting-started.html#android-development-environment.
> Run CLI with --verbose flag for more details. Error: Command failed:
> gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
>     at checkExecSyncError (child_process.js:621:11)
>     at execFileSync (child_process.js:639:15)
>     at runOnAllDevices (C:\Users\Bhavna\AwesomeProject\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:94:39)
>     at processTicksAndRejections (internal/process/task_queues.js:93:5)

0 个答案:

没有答案