title: Error when building app using react-native run-android
body: <p>I'm building a react native app for android using the command react-native run-android, and I'm getting the following error while building the app:</p>
  <pre><code>info Installing the app...
  &gt; Task :react-native-async-storage_async-storage:compileDebugJavaWithJavac FAILED
  
  Deprecated Gradle features were used in this build, making it incompatible with Gradle 7.0.
  Use '--warning-mode all' to show the individual deprecation warnings.
  See https://docs.gradle.org/6.2/userguide/command_line_interface.html#sec:command_line_warnings
  35 actionable tasks: 35 executed
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':react-native-async-storage_async-storage:compileDebugJavaWithJavac'.
  &gt; Could not find tools.jar. Please check that /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home contains a valid JDK installation.
  
  * Try:
  Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
  
  * Get more help at https://help.gradle.org
  
  BUILD FAILED in 17s
  
  error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup. Run CLI with --verbose flag for more details.
  Error: Command failed: ./gradlew app:installDebug -PreactNativeDevServerPort=8081
  
  </code></pre>
  <p>How to fix this error?</p>