-1

Facing issue " Failed to install the app. Make sure you have the Android development environment " in react native

I have facing an android development error who should I resolve it . I used npx react-native init project name and then I ran react-native run-android I have always seen an error of android development server enter image description here

Joundill
  • 6,828
  • 12
  • 36
  • 50
syed abbas
  • 17
  • 1
  • A simple search for that error message would have found https://stackoverflow.com/q/63068384/62576 It was also suggested to you as a possible duplicate when you wrote your question, but you chose to ignore it. Please spend some time researching the problem before posting a new question here. – Ken White Jan 14 '22 at 15:10
  • Also see https://stackoverflow.com/q/58147568/62576 and https://stackoverflow.com/q/58138912/62576 – Ken White Jan 14 '22 at 15:37
  • I have already use react-native doctor but issue is not solve – syed abbas Jan 14 '22 at 16:21
  • i just made an variable named ANDROID_HOME and set a sdk path on it and then i set the path of system variable and past node,npm ,tools,too-platform ,sdk,emulator,nodejs,npm – syed abbas Jan 14 '22 at 16:23

1 Answers1

0

It's a common pitfall for beginner. The error

Failed to install the app. Make sure you have the Android development environment ...

is misleading.

The real error is in the line

What went wrong: The suppplied javaHome seems to be invalid

which suggest that you should check the value of your env variable JAVA_HOME and make sure it points to a valid Java installation directory.

And if you have checked it and cannot figure out the problem, you may find it useful to check this question (IntelliJ Gradle Plugin: The supplied javaHome seems to be invalid) out. For example, someone suggest that its possible root cause is the incompatible version (32/64 bit) of your JDK.

asinkxcoswt
  • 2,252
  • 5
  • 29
  • 57