When I try to build the app using ionic build android
I'm getting this error:
[Error: Please install Android target: "android-22".
Hint: Open the SDK manager by running: C:\Program\ Files\Android\android-sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-22
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)]
ERROR building one of the platforms: Error: cmd: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: cmd: Command failed with exit code 2
at ChildProcess.whenDone (C:\Users\nbk2cbg\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)
at ChildProcess.emit (events.js:110:17)
at maybeClose (child_process.js:1015:16)
at Process.ChildProcess._handle.onexit (child_process.js:1087:5)
I've installed Android API 23, 22 and 17. Added the PATH to the Environment Variables. Installed and reinstalled nodejs.
Obviously I also installed the platform-tools (all of them) and the Build-tools (all of them).
I forget to mention that my environment is on windows.
Any other idea?