0

i am new to react native and I am trying to start a new project but I am getting the following error


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

I have set envinonmet variables but I don't know why issue occurring can some one help enter image description here

enter image description here

vivek kn
  • 107
  • 1
  • 18
  • 45
  • Does this answer your question? [React Native: JAVA\_HOME is not set and no 'java' command could be found in your PATH](https://stackoverflow.com/questions/48298910/react-native-java-home-is-not-set-and-no-java-command-could-be-found-in-your) – Mod3rnx Nov 23 '22 at 11:12
  • @Oleksii i folowed that anwer and i have chnaged environment variable and the correct answer in that is following a linux os I have windows – vivek kn Nov 23 '22 at 11:15
  • There is an [answer for windows](https://stackoverflow.com/a/59594243/11410980) as well – Mod3rnx Nov 23 '22 at 11:21
  • @Oleksii i have updated the envionment variable as that answer also pls check the new screenshot I added still same errror – vivek kn Nov 23 '22 at 11:27
  • 1
    got the answer i just had to restart my computer – vivek kn Nov 23 '22 at 11:38

0 Answers0