1

I am trying to build my ionic mobile app with the command ionic build android, but I am getting the error..

Error: Please install Android target: "android-23".

Hint: Open the SDK manager by running: /home/al/Downloads/android-sdk-linux/tools/android
You will require:
1. "SDK Platform" for android-23
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)

I already meet this requirements in my android sdk manager. I also already put my ANDROID_HOME path in ~/.bashrc file

export ANDROID_HOME=/home/al/Downloads/android-sdk-linux/
export PATH=${PATH}:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

I already follow the steps in this post, but still getting the same error. Does anybody know what is missing? Thanks

Community
  • 1
  • 1
Al Ryan Acain
  • 477
  • 8
  • 17

4 Answers4

1

This error is saying that you have not downloaded Android API 23 - Marshmallow, and you are going to target the same API level in your application. That's why your application is not going to build.

You have two options to solve your error:

  1. Change your target version to whatever you have latest Android API. (i.e. If you have downloaded Android API 22, then target to 22).
  2. Other way is, go to SDK manager and download all packages of API 23.
Dhruv
  • 1,801
  • 1
  • 15
  • 27
0

You shall your change targetSdkVersion to 22 or lower in build.gradle in your module like this:

defaultConfig {
    targetSdkVersion 22
}
Mark Shen
  • 346
  • 1
  • 5
0

Please set the configuration in build.gradle inside app folder. Don't forget to cross-check with your installed versions.

defaultConfig {
    minSdkVersion 14
    targetSdkVersion 23
    buildToolsVersion "23.0.1"

}

Mukesh
  • 266
  • 1
  • 4
  • 10
  • Go to File -> project Structure into Project Structure Left -> SDK Location , Check if your path is set to sdk location. – Mukesh May 25 '16 at 09:24
0

Going to Project.properties file and changing the target-sdk to android-24 worked for me!

CodeSsscala
  • 729
  • 3
  • 11
  • 23