I am trying to run a React native app with this command
npx react-native run-android --variant=stagingDebug --appId com.ursafe_staging
But getting this wrong environment path error
ERROR: JAVA_HOME is set to an invalid directory: C:\Program Files\Java\jdk1.8.0_202\bin
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:installStagingDebug -PreactNativeDevServerPort=8081
Here is my environment path looks like
and this one
Still getting the error when I run the command.