科尔多瓦平台添加android的同时列出Android的目标不工作 [英] cordova platform add android not working while listing Android targets

查看:113
本文介绍了科尔多瓦平台添加android的同时列出Android的目标不工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有问题,当我想要一个Android平台添加到我的PhoneGap的应用程序。 我得到了我的CLI此消息时,我执行命令科尔多瓦平台添加机器人:

I got problem when i want to add an android platform to my phoneGap application. I got this message in my CLI when i execute the command cordova platform add android :

检查Android的要求... (错误:同时列出Android的目标发生了错误)

Checking Android requirements... (Error: An error occurred while listing Android targets)

我已经尝试添加路径变量我的Andr​​oid SDK中的位置。

I already try to add my android sdk location in the path variable.

请帮帮我! :D

我工作在Windows 7 64位的,我安装Android的API 17,18和19的Andr​​oid SDK。 我是3.2的PhoneGap版本。

I work on Windows 7 64 bits, i install the android API 17, 18 and 19 with the android SDK. I am on 3.2 phoneGap version.

推荐答案

要工作,这科尔多瓦命令需要使用一些程序设到 SDK /工具目录。你还需要安装的 Apache Ant的

To work, this cordova command needs to use some programs located into your sdk/tools directory. You need also have installed apache ant.

然后,你必须添加这些目录到 PATH 系统变量:

Then you must add these directories into your PATH system variable:

背景:

  • 让我们假设你已经安装了你的<一个href="http://cordova.apache.org/docs/en/3.2.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide_requirements_and_support">Android SDK 到 C:\ SDK \机器人目录
  • 您已经安装了您 Apache Ant的 C:\工具\ Apache的蚂蚁目录
  • let's assume you have installed your Android SDK to the c:\sdk\android directory
  • you have installed you Apache ant to the c:\tools\apache-ant directory

然后,你必须创建两个系统变量:

Then you must create two system variables:

  1. ANDROID_HOME C:\ SDK \机器人
  2. ANT_HOME C:\工具\ Apache的蚂蚁
  1. ANDROID_HOME with the c:\sdk\android value
  2. ANT_HOME with the c:\tools\apache-ant value

最后,你必须修改 PATH 变量,并添加这两个到 PATH 值的结尾:

Finally, you must modify the PATH variable and add those two to the end of the PATH' value:

;%PATH%\tools;%ANT_HOME%\bin;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools

注意:对于那些谁使用Linux,指令还是有些不同。

NOTE: for those who uses Linux, the instruction differs a bit.

更多可用的文档<一href="http://docs.phonegap.com/en/3.2.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide">here.

这篇关于科尔多瓦平台添加android的同时列出Android的目标不工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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