我正在尝试使用 Xcode 3.2 进行 java 工具开发。我的项目构建没有问题,并显示它构建了文件 build.xml ,并且也很好地显示在文件夹中。当我尝试运行 .java 文件时,出现错误:“Buildfile: build.xml 不存在!构建失败”。在终端中运行“ant -find build.xml”会产生“未找到”。我相信问题是我需要指向我自己的 build.xml 位置,但我不知道如何更改它查找该文件的目录。任何帮助是极大的赞赏。 -尼克
Mac 操作系统 10.6、Xcode 3.2.1 - 创建应用程序的方法:管理器>从模板新建>Java工具
最佳答案
Ant manual说的是:
When no arguments are specified, Ant looks for a
build.xml
file in the current directory and, if found, uses that file as the build file and runs the target specified in the default attribute of the<project>
tag. To make Ant use a build file other thanbuild.xml
, use the command-line option-buildfile file
, wherefile
is the name of the build file you want to use.
所以你的问题的答案是你需要将目录更改为包含 build.xml
的目录文件,或者您需要添加 -buildfile file
选项,其中 file
是构建文件的路径名。
关于java - Xcode错误: "Buildfile: build.xml does not exist! Build failed",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2614378/