react-native run-android报错
来源:1-5 项目底部导航菜单开发
WDF_
2017-08-28
D:\ReactNative\App>react-native run-android
Scanning 556 folders for symlinks in D:\ReactNative\App\node_modules (28ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...
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.
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
events.js:160
throw er; // Unhandled 'error' event
^
Error: spawn cmd.exe ENOENT
at exports._errnoException (util.js:1020:11)
at Process.ChildProcess._handle.onexit (internal/child_process.js:193:32)
at onErrorNT (internal/child_process.js:367:16)
at _combinedTickCallback (internal/process/next_tick.js:80:11)
at process._tickCallback (internal/process/next_tick.js:104:9)
1回答
-
看log,你的是Windows系统? 看JAVA_HOME等环境变量是不是忘记了设置了呢?
012017-08-30
相似问题