title: Ubuntu, can not start react-native: Could not find tools.jar
body: <p>I followed the <a href="https://facebook.github.io/react-native/docs/getting-started.html" rel="noreferrer">getting started guide</a> Android/Linux.</p>
  
  <p>I try to start react native under ubuntu using <code>react-native run-android</code>, but it fails with the error:</p>
  
  <pre><code>FAILURE: Build failed with an exception.
  
      * What went wrong:
      Execution failed for task ':app:compileDebugJavaWithJavac'.
      &gt; Could not find tools.jar  
  </code></pre>
  
  <p>How can I fix it? </p>
  
  <p>Full output:</p>
  
  <pre><code> $ react-native run-android
      Starting JS server...
      /bin/sh: 1: adb: not found
      Building and installing the app on the device (cd android &amp;&amp; ./gradlew installDebug...
      :app:preBuild UP-TO-DATE
      :app:preDebugBuild UP-TO-DATE
      :app:checkDebugManifest
      :app:preReleaseBuild UP-TO-DATE
      :app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
      :app:prepareComAndroidSupportRecyclerviewV72301Library UP-TO-DATE
      :app:prepareComAndroidSupportSupportV42321Library UP-TO-DATE
      :app:prepareComFacebookFrescoDrawee0110Library UP-TO-DATE
      :app:prepareComFacebookFrescoFbcore0110Library UP-TO-DATE
      :app:prepareComFacebookFrescoFresco0110Library UP-TO-DATE
      :app:prepareComFacebookFrescoImagepipeline0110Library UP-TO-DATE
      :app:prepareComFacebookFrescoImagepipelineBase0110Library UP-TO-DATE
      :app:prepareComFacebookFrescoImagepipelineOkhttp30110Library UP-TO-DATE
      :app:prepareComFacebookReactReactNative0361Library UP-TO-DATE
      :app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
      :app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
      :app:prepareDebugDependencies
      :app:compileDebugAidl UP-TO-DATE
      :app:compileDebugRenderscript UP-TO-DATE
      :app:generateDebugBuildConfig UP-TO-DATE
      :app:generateDebugAssets UP-TO-DATE
      :app:mergeDebugAssets UP-TO-DATE
      :app:generateDebugResValues UP-TO-DATE
      :app:generateDebugResources UP-TO-DATE
      :app:mergeDebugResources UP-TO-DATE
      :app:bundleDebugJsAndAssets SKIPPED
      :app:processDebugManifest UP-TO-DATE
      :app:processDebugResources UP-TO-DATE
      :app:generateDebugSources UP-TO-DATE
      :app:processDebugJavaRes UP-TO-DATE
      :app:compileDebugJavaWithJavac FAILED
  
      FAILURE: Build failed with an exception.
  
      * What went wrong:
      Execution failed for task ':app:compileDebugJavaWithJavac'.
      &gt; Could not find tools.jar
  </code></pre>
  
  <p>Running <code>echo $JAVA_HOME</code> gives <code>/usr/lib/jvm/java-8-openjdk-amd64</code></p>