【发布时间】:2015-11-26 20:16:21
【问题描述】:
当我尝试使用 ionic build android 构建应用程序时,我收到了这个错误:
[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)
我已经安装了 Android API 23、22 和 17。将 PATH 添加到环境变量中。安装并重新安装了nodejs。
显然我还安装了平台工具(全部)和构建工具(全部)。
我忘了说我的环境是在 windows 上。
还有什么想法吗?
【问题讨论】:
标签: android cordova build ionic-framework