title: React Native Fails When I Try To Run on Emulator
body: <p>today I just created my first React Native project but when I tried to run it on my avd just like;</p>
  
  <pre><code>react-native run-android
  </code></pre>
  
  <p>but it always gives this:</p>
  
  <pre><code>info JS server already running.
  info Building and installing the app on the device (cd android &amp;&amp; ./gradlew app:installDebug)...
  Starting a Gradle Daemon, 1 incompatible and 2 stopped Daemons could not be reused, use --status for details
  &gt; Task :app:preBuild UP-TO-DATE
  &gt; Task :app:preDebugBuild UP-TO-DATE
  &gt; Task :app:compileDebugAidl NO-SOURCE
  &gt; Task :app:compileDebugRenderscript NO-SOURCE
  &gt; Task :app:checkDebugManifest UP-TO-DATE
  &gt; Task :app:generateDebugBuildConfig UP-TO-DATE
  &gt; Task :app:bundleDebugJsAndAssets SKIPPED
  &gt; Task :app:prepareLintJar UP-TO-DATE
  &gt; Task :app:generateDebugSources UP-TO-DATE
  &gt; Task :app:javaPreCompileDebug
  &gt; Task :app:mainApkListPersistenceDebug UP-TO-DATE
  &gt; Task :app:generateDebugResValues
  &gt; Task :app:generateDebugResources
  &gt; Task :app:mergeDebugResources
  &gt; Task :app:createDebugCompatibleScreenManifests UP-TO-DATE
  &gt; Task :app:processDebugManifest UP-TO-DATE
  &gt; Task :app:processDebugResources
  &gt; Task :app:compileDebugJavaWithJavac FAILED
  
  FAILURE: Build failed with an exception.
  
  * What went wrong:
  Execution failed for task ':app:compileDebugJavaWithJavac'.
  &gt; Could not find tools.jar. Please check that /usr/lib/jvm/java-8-openjdk/jre 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
  
  Deprecated Gradle features were used in this build, making it incompatible with Gradle 6.0.
  Use '--warning-mode all' to show the individual deprecation warnings.
  See https://docs.gradle.org/5.1.1/userguide/command_line_interface.html#sec:command_line_warnings
  
  BUILD FAILED in 26s
  12 actionable tasks: 5 executed, 7 up-to-date
  error Could not install the app on the device, read the error above for details.
  Make sure you have an Android emulator running or a device connected and have
  set up your Android development environment:
  https://facebook.github.io/react-native/docs/getting-started.html
  error Command failed: ./gradlew app:installDebug. Run CLI with --verbose flag for more details.
  </code></pre>
  
  <p>I don't know what should I do and I totally need your help.</p>
  
  <p>Thanks for your attention.</p>