'React-native Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

when starting my react-native project react-native run-android I get the error in the picture.enter image description here

on the internet cd ./android ./gradlew.bat installDebug command says it will repair but this command does not work thanks you so much enter image description here



Solution 1:[1]

I found out that the problem was with the java version, I upgraded the installed 1.8 version to 11 and the windows advanced site settings > environment variables in the picture. my JAVA_HOME i updatedenter image description here

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 yusufavz