target android21,Cordova : [Error: Please install Android target: "android-21"

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:

cordova build android

I always get the following message:

Running command: /Users/peter/workspace/myapp/platforms/android/cordova/build

[Error: Please install Android target: "android-21".

Hint: Open the SDK manager by running: /Users/peter/adt-bundle-mac/sdk/tools/android

You will require:

1. "SDK Platform" for android-21

2. "Android SDK Platform-tools (latest)

3. "Android SDK Build-tools" (latest)]

ERROR building one of the platforms: Error: /Users/peter/workspace/myapp/platforms/android/cordova/build: Command failed with exit code 2

You may not have the required environment or OS to build this project

Error: /Users/peter/workspace/myapp/platforms/android/cordova/build: Command failed with exit code 2

at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:131:23)

at ChildProcess.emit (events.js:110:17)

at maybeClose (child_process.js:1008:16)

at Process.ChildProcess._handle.onexit (child_process.js:1080:5)

I tried also

cordova platform rm android

cordova platform add android

But with the same result:

I tried to find a few hours any working solution, but with luck.

Thanks for any advice.

System information:

OS: Mac OS X Yosemite

Node Version: v0.12.0

Cordova CLI: 4.3.0

Ionic Version: 0.9.27

Ionic CLI Version: 1.3.18

Xcode version: Xcode 6.2 Build version 6C131e

ios-sim version: 3.1.1

ios-deploy version: 1.4.0

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值