错误:错误:请安装Android目标:“android-18”

时间:2015-08-13 10:37:57

标签: android cordova

我正在使用Cordova 5.1,当我运行cordova emulate android时,我收到此错误:

Running command: cmd "/s /c "c:\Users\Soheil\Desktop\phoneGap\hello\platforms\an
droid\cordova\run.bat --emulator""
ERROR: Error: Please install Android target: "android-18".

Hint: Open the SDK manager by running: C:\Program\ Files\ (x86)\Android\android-
sdk\tools\android.BAT
You will require:
1. "SDK Platform" for android-18
2. "Android SDK Platform-tools (latest)
3. "Android SDK Build-tools" (latest)
Error: cmd: Command failed with exit code 2
    at ChildProcess.whenDone (C:\Users\Soheil\AppData\Roaming\npm\node_modules\c
ordova\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)  

这是我的sdk经理:

enter image description here

有什么想法吗?感谢

1 个答案:

答案 0 :(得分:1)

问题是,根据您的屏幕截图,您已经安装了Android 4.1.2(API 16),但您的程序需要Android 4.3(API 18)。如果你下载了相应的文件,你应该很高兴。