使用Linux,我运行命令:
cordova build
并获得以下内容:
[Error: Please install Android target: "android-22".
Hint: Open the SDK manager by running:
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: /var/programming/projects/hello/platforms/android/corda/build: Command failed with exit code 2
You may not have the required environment or OS to build this project
Error: /var/programming/projects/hello/platforms/android/cordova/build: Command failed with exit ce 2
at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/corva/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)
我以“root”用户身份运行所有内容,并设置了所需的环境变量。
P.S。
我遵循了这个指南: https://cordova.apache.org/docs/en/4.0.0/guide_cli_index.md.html