【发布时间】:2015-08-28 13:54:57
【问题描述】:
命令cordova build android 失败,输出如下
BUILD FAILED
F:\Programs\SDK\tools\ant\build.xml:597: The following error occurred while executing this line:
F:\Programs\SDK\tools\ant\build.xml:649: The following error occurred while executing this line:
F:\Programs\SDK\tools\ant\build.xml:694: Execute failed: java.io.IOException: Cannot run program
"F:\code\asistenciaBT\platforms\android\CordovaLib\${aapt}"
(in directory "F:\code\asistenciaBT\platforms\android\CordovaLib"): CreateProcess error=2,
El sistema no puede encontrar el archivo especificado
意思是,据我所知,ant 找不到 aapt 文件。 Ant 已安装:
ant -version
Apache Ant(TM) version 1.9.4 compiled on April 29 2014
ANDROID_HOME 和 PATH 也已正确设置。我之前让cordova在这个系统上工作,现在它拒绝了。
cordova 应该在项目目录中寻找 appt 吗?它不应该在ANDROID_HOME/build_tools 上看吗?
一些进一步的细节,以防万一:
npm -v
2.7.4
node -v
v0.12.2
cordova -v
5.1.1
os: windows 8.1 pro 64 bits
项目是从 github 克隆的,所以它可能在某处有一些继承的不兼容性。
编辑:
刚刚在一个新项目上测试了“cordova build”,它失败并出现同样的错误。
【问题讨论】:
-
我也有类似的问题