尝试在ubuntu meachine上的终端中构建sencha应用程序时出现以下错误。
edge@edge-HP:~/Desktop/Anupam2014/MobileAtSite_Aug23/cordova$ cordova build
Running command: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/cordova/build
Buildfile: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml
建立失败
/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml:90: Cannot find
/home/transnoesis/Downloads/adt-bundle-linux-x86_64-20130729/sdk/tools/ant/build.xml imported from
/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml
总时间:0秒 命令的错误代码1:ant with args:debug, -
f,/home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/build.xml,-Dout.dir=ant-build,-Dgen.absolute.dir=ant-gen
Error: /home/edge/Desktop/Anupam2014/MobileAtSite_Aug23/cordova/platforms/android/cordova/build: Command failed with exit code 2
at ChildProcess.whenDone (/usr/lib/node_modules/cordova/src/superspawn.js:126:23)
at ChildProcess.emit (events.js:98:17)
at maybeClose (child_process.js:756:16)
at Process.ChildProcess._handle.onexit (child_process.js:823:5)
答案 0 :(得分:1)
这看起来是路径设置问题,无法找到sdk& s的路径蚂蚁工具。
目前我在Windows上看看我是如何在Windows上设置路径的,所以你在Ubuntu上相应地检查和设置你的路径,希望对你有帮助。
ANT_Home: C:\Program Files\apache-ant-1.9.4
Java_Home: C:\Program Files\Java\jdk1.7.0_60
ANDROID_HOME: C:\Android\AndroidSDK\sdk
<强>路径强> :.;C:\Program Files\nodejs\;%ANT_HOME%\bin;%ANDROID_HOME%\platform-tools;%ANDROID_HOME%\tools;