科尔多瓦添加平台 - 错误执行命令“蚁族” [英] cordova add platform - Error executing command 'ant'

查看:110
本文介绍了科尔多瓦添加平台 - 错误执行命令“蚁族”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道这个问题已经被问了太多的时间和..我检查了所有ansers上左右。想尽组合,每一个解决方案,我发现,但到目前为止,一切都没有为我工作。

I know that this question has been asked way too many times and.. I checked all ansers on SO. Tried every combination and every solution I found but nothing has worked for me so far.

我已经成功地安装了科尔多瓦从官方网站下载它,我一直在下面的指南。

I've succesfully installed cordova downloading it from the official site and I've been following the Guide.

我已经添加了 WP8 平台的成功地的第一位。然后我试图添加机器人为好。

I've added wp8 platform succesfully first. Then I tried to add android as well.

执行命令科尔多瓦平台添加后,Android ,我得到了下面的错误。

After executing the command cordova platform add android, I got the following error.

Error: executing command 'ant', make sure you have ant installed and added to your path.

下面是更多的细节截图:

Here's a screenshot with more details:

我已经安装了ANT,最后的Java JDK,并添加所有必要的环境变量,以我的系统。

I've installed ANT, the last Java JDK and added all necessary Enviroment Variables to my System.

ANT和JAVA都得到来自任何来源的路径执行罚款。

ANT and JAVA both gets executed fine from any source path.

蚂蚁-version 输出

Apache Ant的(TM)2014年4月29日编译版本1.9.4

Apache Ant(TM) version 1.9.4 compiled on April 29 2014

Java的版本输出

Java的热点(TM)64位服务器VM(25.5建造-B02,混合模式)

Java HotSpot(TM) 64-Bit Server VM (build 25.5-b02, mixed mode)

我已经成立了一切必要的变量。从ANT_HOME到PATH。一切都因为它应该是


Enviroment Variables

I've set up every necessary variable. From ANT_HOME to PATH. Everything is as it should be

ANT_HOME: C:\Program Files\Ant 

JAVA_HOME: C:\Program Files\Java\jdk1.8.0_05

ANDROID_HOME: C:\Users\Kevin\Desktop\Cellulare\Development\sdk

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

由于每个人都可以看到,我还添加了android的平台工具工具我的 PATH 。为Ant和Java(\\ BIN迪尔斯)同样的事情。

As everyone can see, I've also added android platform-tools and tools to my PATH. Same thing for Ant and Java (\bin dirs).

自不必说,但每一个路径是正确的。

Needless to say but every path is correct.

有了这个东西说,为什么这仍然不起作用?我也重新启动我的电脑也有,但没有结果。

Having this things said, Why this still doesn't work? I've also restarted my PC as well but with no results.

感谢 凯丽Shotts

我的问题是,从这些空间在我的道路。

My problems were from those spaces in my paths.

于是我改变了 C:\\ Program Files文件\\ ... C:\\ PROGRA〜1 \\ ...

重要!

我也注意到有2 在我的字符串的字符。像这样的 .. \\ C□□ellulare \\ .. 。他们可能从错误的复制 - 粘贴格式来了。修复这些事以后一切正常!

I also noticed there were 2 characters in my strings. Like this ..\C□□ellulare\... They probably came from a wrong copy-paste format. After fixing these things everything worked!

推荐答案

,空格在一些执行而在别人忽略。
利用一个文件名,如计划(空格)文件确实从\\的bin目录编译时产生错误。
下一次你声明一个环境变量,请确保您的文件夹不包含各种名称之间的空格或空白。
FYI:其中介绍了围绕这一理念牵引工作驼峰脚本。
谢谢。

Due to the nature of languages, whitespaces are executed in some whilst ignored in others. Utilizing a file name such as "Program(whitespace)Files" does produce errors when compiling from \bin directories. Next time you declare an environmental variable, be sure that your folder does not contain any whitespaces or gaps between the various names. FYI: camelCase scripts where introduced tow work around this concept. Thanks.

这篇关于科尔多瓦添加平台 - 错误执行命令“蚁族”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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