title: Nativescript Android Emulator Not Running
body: <p>It's been 4 days since I tried to setup my Android environment but still I get a bunch of errors. I gave up to the point I re-installed my Mac OS, but still found no solution</p>
  
  <p>I installed nativescript as the docs recommended, but when I run <code>tns doctor</code> I get the following error:</p>
  
  <pre><code>✔ Getting environment information 
  
  TIP: To avoid setting up the necessary environment variables, you can use the Homebrew package manager to install the Android SDK and its dependencies.
  
  There seem to be issues with your configuration.
  ✔ Getting NativeScript components versions information...
  ✔ Component nativescript has 4.1.2 version and is up to date.
  ✔ Component tns-core-modules has 4.1.0 version and is up to date.
  ✖ Component tns-android is not installed.
  ✖ Component tns-ios is not installed.
  ✔ Javac is installed and is configured properly.
  ✔ The Java Development Kit (JDK) is installed and is configured properly.
  ✔ Xcode is installed and is configured properly.
  ✔ xcodeproj is installed and is configured properly.
  ✔ CocoaPods update is not required.
  ✔ Your current CocoaPods version is newer than 1.0.0.
  ✔ Python installed and configured correctly.
  ✔ The Python 'six' package is found.
  ✖ The ANDROID_HOME environment variable is not set or it points to a non-existent directory. You will not be able to perform any build-related operations for Android. 
   To be able to perform Android build-related operations, set the `ANDROID_HOME` variable to point to the root of your Android SDK installation directory. 
  
  ✖ WARNING: adb from the Android SDK is not installed or is not configured properly.  
   For Android-related operations, the NativeScript CLI will use a built-in version of adb.
  To avoid possible issues with the native Android emulator, Genymotion or connected
  Android devices, verify that you have installed the latest Android SDK and
  its dependencies as described in http://developer.android.com/sdk/index.html#Requirements 
  
  ✖ WARNING: The Android SDK is not installed or is not configured properly. 
   You will not be able to run your apps in the native emulator. To be able to run apps
  in the native Android emulator, verify that you have installed the latest Android SDK 
  and its dependencies as described in http://developer.android.com/sdk/index.html#Requirements 
  
  ✖ Cannot find a compatible Android SDK for compilation. To be able to build for Android, install Android SDK 22 or later. 
   Run `$ sdkmanager` to manage your Android SDK versions. 
  
  ✖ You need to have the Android SDK Build-tools installed on your system. You can install any version in the following range: '&gt;=23 &lt;=27'. 
   Run `$ sdkmanager` from your command-line to install required `Android Build Tools`. In case you already have them installed, make sure `ANDROID_HOME` environment variable is set correctly. 
  
  ✖ You need to have Android SDK 22 or later and the latest Android Support Repository installed on your system. 
   Run `$ sdkmanager` to manage the Android Support Repository. In case you already have it installed, make sure `ANDROID_HOME` environment variable is set correctly. 
  
  ✖ WARNING: CocoaPods is not installed or is not configured properly. 
   You will not be able to build your projects for iOS if they contain plugin with CocoaPod file.
  To be able to build such projects, verify that you have installed CocoaPods. 
  
  You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options: 
  Select "Configure for Local Builds" to run the setup script and automatically configure your environment for local builds.
  Select "Skip Step and Configure Manually" to disregard this option and install any required components manually.
  You have nativescript-cloud extension installed, so you can execute cloud builds, but your environment is not configured properly and you will not be able to execute local builds. To continue, choose one of the following options: 
  Select "Configure for Local Builds" to run the setup script and automatically configure your environment for local builds.
  Select "Skip Step and Configure Manually" to disregard this option and install any required components manually.
  ? To continue, choose one of the following options:  (Use arrow keys)
  ❯ Try Cloud Operation 
    Configure for Local Builds 
    Skip Step and Configure Manually 
  </code></pre>
  
  <p>I checked every error and every URL in every error without figuring this out.</p>
  
  <p>I checked that <code>$ANDROID_HOME</code> is in my ~/.bash_profile as well as <code>$JAVA_HOME</code>.</p>
  
  <p>My ~/.bash_profile have these two paths:</p>
  
  <pre><code>export ANDROID_HOME=/usr/local/share/android-sdk
  export JAVA_HOME=/Library/Java/Home
  </code></pre>
  
  <p>When I run tns doctor and select the 'Configure for Local Builds' it starts re-downloading 'Google Chrome', 'Homebrew', 'Java SE' etc. and even then I still get the same error.</p>
  
  <p>I tried to specify the emulator even then I get the same output as the 'tns doctor' command.</p>