[Solved] Error on build my first app for android, please help


#1

I’m following the tutorial on the website to creat my first “todo” app.

When I try to build the “todo” app for android ("$ ionic build android") I got the error below, how do I solve this?

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:\Users…\Ap
pData\Local\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:\Users…\AppData\Local\Androi
d\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)

#2

I solved the issue by adding ANDROID_HOME = “C:\Users…\AppData\Local\Android\sdk” .