Failed Android Integration?

Developing with ionic for the first time.
Have a mock up app that runs PC::Chrome and Android::Crome 100%
Creating an Android APK always fails, despite following all the installation steps I took.

Short error is this:

  • 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: "C:\Program Files (x86)\Android\android-sdk\tools\android.bat"
You will require:

  1. “SDK Platform” for android-23
  2. "Android SDK Platform-tools (latest)
  3. “Android SDK Build-tools” (latest)

Full Error:

C:\Users\ForbiddenSoul\myproject>ionic emulate android
Running command: “C:\Program Files (x86)\nodejs\node.exe” C:\Users\ForbiddenSoul\myproject\hooks\after_prepare\010_add_platform_class.js C:\Users\ForbiddenSoul\myproject

add to body class: platform-android

ANDROID_HOME=C:\Program Files (x86)\Android\android-sdk

JAVA_HOME=C:\Program Files\Java\jdk1.8.0_101

FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

failed to find target with hash string ‘android-23’ in: C:\Program Files (x86)\Android\android-sdk

  • Try:
    Run with --stacktrace

BUILD FAILED

Total time: 2.246 secs

option to get the stack trace. Run with --info or --debug option to get more log output.

Error: cmd: Command failed with exit code 1 Error output:
FAILURE: Build failed with an exception.

  • What went wrong:
    A problem occurred configuring root project ‘android’.

failed to find target with hash string ‘android-23’ in: C:\Program Files (x86)\Android\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: "C:\Program Files (x86)\Android\android-sdk\tools\android.bat"
You will require:

  1. “SDK Platform” for android-23
  2. "Android SDK Platform-tools (latest)
  3. “Android SDK Build-tools” (latest)

I think I’m missing something simple with my directory paths.
%ANDROID_HOME%=C:\Program Files (x86)\Android\android-sdk

It needs to pick up build tools from %ANDROID_HOME%, there are not in there! They are in %ANDROID_HOME%\build-tools\ versioned folders 19-24 i’ts trying to find 23

I just copied the contents of “build-tools” into their parent “android-sdk” I’ll post if that worked

You can add %ANDROID_HOME%\build-tools\ to your path, which I have, but ionic or cordova or gulp or ant, or what ever, all of them look in %ANDROID_HOME% and only there, never (it apears) in %ANDROID_HOME%\build-tools where they are actually shipped.

Any ideas on how to integrate android .apk builds on windows 10 with ionic?

Update Android get latest SDK Platform