当前位置: 动力学知识库 > 问答 > 编程问答 >

android - Cordova building error on Windows

问题描述:

I am having a tremendous problem with cordova. For some reason, the command cordova build gives me the following error and I cannot figure out why. I try to do a simple andoid application on Windows 7.

 C:\Users\User\Documents\Cordova\workshop>cordova build

Running command: cmd "/s /c "C:\Users\User\Documents\Cordova\workshop\platforms\

android\cordova\build.bat""

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

Hint: Open the SDK manager by running: C:\Users\User\AppData\Local\Android\sdk\t

ools\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\User\AppData\Roaming\npm\node_modules\cor

dova\node_modules\cordova-lib\src\cordova\superspawn.js:139:23)

at emitTwo (events.js:87:13)

at ChildProcess.emit (events.js:172:7)

at maybeClose (internal/child_process.js:818:16)

at Process.ChildProcess._handle.onexit (internal/child_process.js:211:5)

C:\Users\User\Documents\Cordova\workshop>

Do you have any advice how to solve this problem?

分享给朋友:
您可能感兴趣的文章:
随机阅读: