I just updated cordova + ionic in my app, after that i installed successfully Android-SDK v22 via Android SDK manager.
But after the running command:
Follow these steps.
1) Type android
on command line.(Make sure ANDROID_HOME and PATH are set properly)
2) Select API 21
from the populated list.
3) Click install packages
.
4) Type android avd
on command line.
5) Set API level and other config.
6) Now type ionic build android
.
In my case it was the path to my SDK folder that was causing this error.
C:\Users\username\AppData\Local\Android\android-sdk
changed to
C:\Users\username\AppData\Local\Android\sdk
Make sure your project path doesn't consist spaces.
I face the same problem asking me to install the target android platform when build. I have triple confirm my android sdk path, jdk path and various setting in path but still getting the same error. Finally, the problem resolved by simply renamed(removed spaces) the folder that store my Cordova project. For example : "C:\Cordova & Phonegap Sample\MyCordovaApp" to "C:\Cordova_Sample\MyCordova".
Open Android SDK Manager, and check whether the target version exists, Install if not exists.
I have been having the same problem in windows. It appeared that when I was running the SDK Manager you have to select "Run as Administrator" otherwise it denies permission to install certain files, on of them being "ANDROID-22"
Here is the the link I found to resolve this issue: android sdk manger not updating
many times the problem is that not is configurated the path environment variable ANDRIOD_HOME. Take a look
%ANDROID_HOME% = C:\Program Files (x86)\Android\android-sdk
In Path:
%ANDROID_HOME%\tools;
%ANDROID_HOME%\platform-tools;