java - Xcode错误: "Buildfile: build.xml does not exist! Build failed"

标签 java xcode macos ant

我正在尝试使用 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 than build.xml, use the command-line option -buildfile file, where file 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/

相关文章:

xcode - 如何在 Mac 框架中调用 cpuid 指令?

macos - Objective-C 将图像拖入 NSTextView 子类

java - 如何将文本发送到页面源代码中的富文本编辑器

java - 关于内存泄漏和泛型方法

java - 为什么 org.apache.xerces.parsers.SAXParser 不跳过 utf8 编码的 xml 中的 BOM?

macos - Mac OS X 的核心动画工具?

java - Mac OSX - appletviewer 不显示任何内容

java - 为什么 JVM 无法检测到缺失的方法实现?

objective-c - XCODE在构建和运行时自动保存代码?

xcode - 如何增加图像的尺寸?