title: Ionic: Failed to build android
body: <p>Having huge issues trying to build to android with Ionic. I tried initially the normal <code>ionic build android</code>, it failed with </p>
  
  <pre><code>[Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.]
  </code></pre>
  
  <p>I did some hunting around stack overflow and ionic forums, and installed Java and Android Studio as a 'solution', it began to install lots of .jar files, and this happened:</p>
  
  <pre><code> Download https://repo1.maven.org/maven2/commons-logging/commons-logging/1.1.1/commons-logging-1.1.1.jar
  
  
      Download https://repo1.maven.org/maven2/commons-codec/commons-codec/1.4/commons-codec-1.4.jar
  
  
      Download https://repo1.maven.org/maven2/com/android/tools/external/lombok/lombok-ast/0.2.3/lombok-ast-0.2.3.jar
  
  
      Download https://repo1.maven.org/maven2/org/abego/treelayout/org.abego.treelayout.core/1.0.1/org.abego.treelayout.core-1.0.1.jar
  
  
  
  
      FAILURE: Build failed with an exception.
  
      * What went wrong:
      A problem occurred configuring root project 'android'.
      &gt; failed to find target with hash string 'android-23' in: /Users/.../Library/Android/sdk
  
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
  
  
      BUILD FAILED
  
      Total time: 51.558 secs
  
      Error: /users/nick/documents/.../.../platforms/android/gradlew: Command failed with exit code 1 Error output:
      FAILURE: Build failed with an exception.
  
      * What went wrong:
      A problem occurred configuring root project 'android'.
      &gt; failed to find target with hash string 'android-23' in: /Users/.../Library/Android/sdk
  
      * Try:
      Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
      Please install Android target: "android-23".
  
      Hint: Open the SDK manager by running: /Users/.../Library/Android/sdk/tools/android
      You will require:
      1. "SDK Platform" for android-23
      2. "Android SDK Platform-tools (latest)
      3. "Android SDK Build-tools" (latest)
  </code></pre>
  
  <p>Any advice? Maybe I need to un-install Android Studio or something? I'm very bad at this, as you likely can tell. But this is hugely holding back the project I'm working on, so will be amazing if someone could help!</p>