未设置java_home,并且在Windows中为Android开发和开发本机应用程序时,在路径错误中找不到“ java”命令

时间:2019-05-03 12:35:38

标签: java android reactjs windows

当我运行cmd->

时,我正在尝试开发本机android应用程序
react-native run-android

显示错误

C:\Windows\System32\PropertyFinder>react-native run-android
info JS server already running.
info Building and installing the app on the device (cd android && gradlew.bat app: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.
error 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/getting-started.html
error Command failed: gradlew.bat app:installDebug. Run CLI with --verbose flag
for more details.

0 个答案:

没有答案