Failed to install the react-native app

Please, need your help.
I have the following error while building the react-native project on adroid studio:
FAILURE: Build failed with an exception.

  • What went wrong:
    The supplied javaHome seems to be invalid. I cannot find the java executable. Tried location: C:\Program Files\Java\jdk-16.

  • Try:
    Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --s
    can to get full insights.

  • Get more help at

error Failed to install the app. Make sure you have the Android development environment set up:
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081

FAILURE: Build failed with an exception.

This not a gradle problem, but an incorrect configuration of android studio: