Famtop myApp $ionic build androIDRunning command: "c:\Program files\nodeJs\node.exe" c:\Users\Famtop\myApp\hooks\after_prepare0_add_platform_class.Js c:/Users/Famtop/myAppadd to body class: platform-androIDRunning command: "c:\Program files\nodeJs\node.exe" c:\Users\Famtop\myApp\hooks\after_prepare0_remove_sass_from_platforms.Js c:/Users/Famtop/myAppRunning command: c:\Users\Famtop\myApp\platforms\androID\cordova\build.batc:\Users\Famtop\myApp\platforms\androID\cordova\node_modules\q\q.Js:126 throw e; ^Error: Failed to run "ant -version",make sure you have ant installed and addedto your PATH. at c:\Users\Famtop\myApp\platforms\androID\cordova\lib\check_reqs.Js:43:27 at ChildProcess.exithandler (child_process.Js:751:5) at ChildProcess.emit (events.Js:110:17) at maybeClose (child_process.Js:1008:16) at Process.ChildProcess._handle.onexit (child_process.Js:1080:5)ERROR building one of the platforms: Error: c:\Users\Famtop\myApp\platforms\androID\cordova\build.bat: Command Failed with exit code 1You may not have the required environment or OS to build this projectError: c:\Users\Famtop\myApp\platforms\androID\cordova\build.bat: Command Failed with exit code 1 at ChildProcess.whenDone (c:\Users\Famtop\AppData\Roaming\npm\node_modules\cordova\node_modules\cordova-lib\src\cordova\superspawn.Js:131:23) at ChildProcess.emit (events.Js:110:17) at maybeClose (child_process.Js:1008:16) at Process.ChildProcess._handle.onexit (child_process.Js:1080:5)
我看过类似的问题,建议我检查路径,但我不确定如何做到这一点:我有最新的JDK和AndroID套件.
任何帮助非常感谢.
F
解决方法 你需要下载 ANT from this link然后将其解压缩,保存在某个文件夹中.然后在系统变量中添加名为ANT_HOME的变量
例如
Variable= `ANT_HOME` value= `H:\apache-ant-1.9.3`
然后将其添加到路径变量
%ANT_HOME%\bin;总结
以上是内存溢出为你收集整理的Android构建失败’无法运行ant版本’全部内容,希望文章能够帮你解决Android构建失败’无法运行ant版本’所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)