科尔多瓦3.5.0安装错误 - 请安装Android的目标19科尔、错误、目标、多瓦

2023-09-12 00:43:48 作者:海盟山誓总是赊

我试图得到这个工作,它的驾驶我坚果:

I try to get this working and it's driving me nuts:

$ cordova platform add android

的输出是:

Creating android project...

/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:126
                    throw e;
                          ^
Error: Please install Android target 19 (the Android newest SDK). Make sure you have the latest Android tools installed as well. Run "android" from your command-line to install/update any missing SDKs or tools.
    at /Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/lib/check_reqs.js:80:29
    at _fulfilled (/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:798:54)
    at self.promiseDispatch.done (/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:827:30)
    at Promise.promise.promiseDispatch (/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:760:13)
    at /Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:574:44
    at flush (/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:108:17)
    at process._tickCallback (node.js:419:13)
Error: /Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/create: Command failed with exit code 8
    at ChildProcess.whenDone (/usr/local/lib/node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
    at ChildProcess.emit (events.js:98:17)
    at maybeClose (child_process.js:755:16)
    at Process.ChildProcess._handle.onexit (child_process.js:822:5)

如果没有运行命令机器人这都是我装的东西:

If did run the command android this are all the things I installed:

我也做了:

开〜/ .bash_profile中

和补充:

出口PATH=${PATH}:/Users/doekewartena/Documents/adt-bundle-mac-x86_64-20140702/sdk/platform-tools:/Users/doekewartena/Documents/adt-bundle-mac-x86_64-20140702/sdk/tools

不过,这并不利于:(

可能有人帮助。

推荐答案

Android的SDK是不是你的目标Android版本。目标Android版本19是Android Kitkat.So在你的SDK管理器检查,如果你有安卓4.4.2安装(API 19)API级别。如果你想你的目标API的版本是不同的,然后在AndroidManifest.xml中更改

Android SDK is not your target Android version. Target Android version 19 is the API level for android Kitkat.So in you SDK manager check if you have Android 4.4.2(API 19) installed. If you want your target API version to be different then change it in ANdroidManifest.xml

<uses-sdk
    android:minSdkVersion="16"
    android:targetSdkVersion="18" />

编辑这些行。在这里,机器人:targetSdkVersion 是你的目标你的Andr​​oid版

Edit these lines. Here android:targetSdkVersion is your Android version that you are targeting.

 
精彩推荐
图片推荐