[英]build cordova with command line in cygwin
I am using cygwin to build the cordova android project. 我正在使用cygwin来构建cordova android项目。
I created a project successfully but there is some errors when I build it: 我成功创建了一个项目,但是在构建项目时出现一些错误:
╭─Dozer@Dozer-PC ~/Projects/ba-crm/crm-plus ‹master*›
╰─$ cordova build 127 ↵
Running command: cmd args=["/c","C:\\cygwin64\\home\\Dozer\\Projects\\ba-crm\\crm-plus\\platforms\\android\\cordova\\build"]
ANT_HOME is set incorrectly or ant could not be located. Please set ANT_HOME.
But I have already install all the libraries in cygwin: 但是我已经在cygwin中安装了所有库:
╭─Dozer@Dozer-PC ~/Projects/ba-crm/crm-plus ‹master*›
╰─$ ant -version
Apache Ant(TM) version 1.9.3 compiled on December 23 2013
╭─Dozer@Dozer-PC ~/Projects/ba-crm/crm-plus ‹master*›
╰─$ java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
╭─Dozer@Dozer-PC ~/Projects/ba-crm/crm-plus ‹master*›
╰─$ cordova -version
3.4.0-0.1.3
Just because the library is installed does not necessarily mean that the environment variable is set. 仅仅因为安装了库并不一定意味着已设置环境变量。 To see if it's set, in Cygwin I believe you can do
echo "$ANT_HOME"
. 要查看是否已设置,在Cygwin中,我相信您可以执行
echo "$ANT_HOME"
。
Additionally as the error says, make sure it's set correctly. 此外,如错误所示,请确保已正确设置。 For example, on my machine
ANT_HOME
points to C:\\Source\\ANT\\apache-ant-1.8.4
. 例如,在我的计算机上
ANT_HOME
指向C:\\Source\\ANT\\apache-ant-1.8.4
。
Lastly, make sure your path is set up to have %ANT_HOME%\\bin
最后,确保您的路径设置为具有
%ANT_HOME%\\bin
导出ANT_HOME = c:/path/apache-ant-1.9.4(导出ANT_HOME / cygdrive / c / path / apache-ant-1.9.4失败-您需要:/样式)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.