ionic 添加android sdk,Windows上的Ionic:安装了Android SDK.仍然得到“错误:请安装Android目标:”android-22“...

我设法打破了我以前工作的版本的离子环境.例如:我下载演示项目“sidemenu”并运行“离子平台添加

android”没有任何问题.当我尝试运行“离子版本”时,我得到以下消息:

$ionic build

Running command: "c:\Program Files\nodejs\node.exe" h:\git\Absolut\hooks\after_p

repare\010_add_platform_class.js h:/git/myapp add to body class: platform-android

Running command: cmd "/s /c "h:\git\Absolut\platforms\android\cordova\build.bat"

"

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

Hint: Open the SDK manager by running: c:\Users\nicsj\AppData\Local\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\nicsj\AppData\Roaming\npm\node_modules\co

rdova\node_modules\cordova-lib\src\cordova\superspawn.js:134: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)

我不明白是否安装了android-22,导致错误信息.我还有SDK Platform-tools和build-tools.他们在路上:

.../c/Program Files (x86)/Java/jdk1.7.0_71/bin:/c/Users/nicsj/AppData/Local/Android/android-sdk/tools:/c/Users/nicsj/AppData/Local/Android/android-sdk/build-tools/22.0.1:/c/Users/nicsj/AppData/Local/Android/android-sdk/platform-tools

离子设置:

Cordova CLI: 5.1.1

Gulp version: CLI version 3.9.0

Gulp local:

Ionic CLI Version: 1.6.4

Ionic App Lib Version: 0.3.8

OS: Windows 7 SP1

Node Version: v0.12.5

Android SDK:

C:\Users\nicsj>android list targets

Available Android targets:

----------

id: 1 or "android-22"

Name: Android 5.1.1

Type: Platform

API level: 22

Revision: 2

Skins: HVGA,QVGA,WQVGA400,WQVGA432,WSVGA,WVGA800 (default),WVGA854,W

XGA720,WXGA800,WXGA800-7in

Tag/ABIs : no ABIs.

----------

id: 2 or "android-23"

Name: Android 6.0

Type: Platform

API level: 23

Revision: 1

Skins: HVGA,WXGA800-7in

Tag/ABIs : no ABIs.

这个问题是新的,我不知道是什么原因造成的.任何关于我应该看的建议?

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值