0
Scanning folders for symlinks in F:\PROJECTS\ReactNative\albums\node_modules (246ms)
Starting JS server...
Building and installing the app on the device (cd android && gradlew.bat installDebug)...


ERROR: JAVA_HOME is set to an invalid directory:  C:\Program Files\Java\jdk1.8.0_144

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

Anyone can tell what's the problem, after I've run "react-native run-android" command.

  • It’s pretty clear in the error response.... you have not installed java correctly or the directory has been moved/deleted. – David Hellsing Nov 07 '17 at 12:34
  • Possible duplicate of [How to set java\_home on Windows 7?](https://stackoverflow.com/questions/2619584/how-to-set-java-home-on-windows-7) – pirho Nov 07 '17 at 12:34
  • No i have copy that path and check on my computer that path is set to correct location to open that path –  Nov 07 '17 at 12:43
  • This helped me: [Reactnative $JAVA_HOME path error](https://stackoverflow.com/questions/44163456/reactnative-java-home-path-error) – José Flores Jan 04 '18 at 13:38
  • set JAVA_HOME='your sdk path that stored in c: drive' –  Jan 08 '18 at 05:57

1 Answers1

0

That question's solution is type following command in cmd for following:

set JAVA_HOME=C:\Program Files\Java\jdk1.8.0_144