gpt4 book ai didi

android - Cordova 3.5.0 安装错误 - 请安装 Android Target 19

转载 作者:IT老高 更新时间:2023-10-28 13:05:02 26 4
gpt4 key购买 nike

我试图让这个工作,它让我发疯:

$ 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)

如果确实运行了命令 android 这就是我安装的所有东西:

installed

我也做过:

打开~/.bash_profile

并补充:

export 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 的 API 级别。因此,在您的 SDK 管理器中检查您是否安装了 Android 4.4.2(API 19)。如果您希望您的目标 API 版本不同,请在 AAndroidManifest.xml 中更改它

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

编辑这些行。这里 android:targetSdkVersion 是您的目标 Android 版本。

enter image description here

关于android - Cordova 3.5.0 安装错误 - 请安装 Android Target 19,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/24931155/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com