Cordova 3.5.0安装错误 - 请安装Android目标19 [英] Cordova 3.5.0 Install Error- Please Install Android Target 19

查看:98
本文介绍了Cordova 3.5.0安装错误 - 请安装Android目标19的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我尝试让这个工作,它是驱动我的坚果:

  $ cordova平台添加android 

输出为:

 创建Android项目... 

/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/node_modules/q/q.js:126
throw e ;
^
错误:请安装Android目标19(Android最新的SDK)。请确保您已安装最新的Android工具。从命令行运行android安装/更新任何缺少的SDK或工具。
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)
在process._tickCallback(node.js:419:13 )
错误:/Users/doekewartena/.cordova/lib/android/cordova/3.5.0/bin/create:命令失败,退出代码8
在ChildProcess.whenDone(/ usr / local / lib /node_modules/cordova/node_modules/cordova-lib/src/cordova/superspawn.js:135:23)
在ChildProcess.emit(events.js:98:17)
at maybeClose(child_process.js :755:16)
在Process.ChildProcess._handle.onexit(child_process.js:822:5)

如果运行命令 android ,这是我安装的所有东西:





我也做了:



打开〜/ .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版本不同,请在ANdroidManifest.xml中进行更改。

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

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




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

$ cordova platform add android

The output is:

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:

I also did:

open ~/.bash_profile

And added:

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

But it doesn't help :(

Could someone help.

解决方案

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" />

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

这篇关于Cordova 3.5.0安装错误 - 请安装Android目标19的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆