android - 生成 Ant 构建文件错误

标签 android eclipse ant

我正在尝试生成 ant 构建文件。但是我收到一个错误

"The build class path order of the source directories of project library is not correct. Exported Ant buildfile will not compile your sources correctly until you swap the order of these directories:
gen<->src"

我使用 file->export->Ant-buildfile 从 eclipse 构建

当我尝试从命令行构建时,我收到:

$ ant debug
Buildfile: /build.xml

BUILD FAILED
Target "debug" does not exist in the project "com.Grupp01.gymapp.MainActivity".

error和eclipse的截图: enter image description here

最佳答案

我遇到了同样的问题。解决方法是:右键单击库 -> 属性 -> Java 构建路径 -> 订购和导出。条目“gen”必须高于“src”(使用向上、向下按钮)。

关于android - 生成 Ant 构建文件错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12891928/

相关文章:

java - 从 build.xml 运行 jUnit 测试时出现 ClassNotFound 异常

compiler-construction - 用ant编译gwt项目的问题

android - 如何从命令行打开 Ubuntu Linux 上的 AVD 管理器?

java - 需要一个用 Java 编写的 Java 和 Javascript diff 工具

eclipse - 如何从 Eclipse 项目中删除文件而不从磁盘中删除文件?

android - 使用 eclipse 在 Android 中快速构建

安卓 : Simple web application crashes on links other then the http scheme

android - 如何检索 Quickblox 自定义对象的相关记录?

java - 如何在android studio中伪装或加密gmail发件人的硬编码密码

带有ant的java版本控制系统