【发布时间】:2012-07-27 04:35:46
【问题描述】:
按照here 列出的所有步骤后,我发现我的 (Class)_ 仍未生成。
自定义规则:
<?xml version="1.0" encoding="UTF-8"?>
<project name="custom_rules">
<target name="-compile" depends="-build-setup, -pre-build, -code-gen, -pre-compile">
<do-only-if-manifest-hasCode elseText="hasCode = false. Skipping...">
<!-- merge the project's own classpath and the tested project's classpath -->
<path id="project.javac.classpath">
<path refid="project.all.jars.path" />
<path refid="tested.project.classpath" />
</path>
<javac encoding="${java.encoding}"
source="${java.source}" target="${java.target}"
debug="true" extdirs="" includeantruntime="false"
destdir="${out.classes.absolute.dir}"
bootclasspathref="project.target.class.path"
verbose="${verbose}"
classpathref="project.javac.classpath"
fork="${need.javac.fork}">
<classpath>
<fileset dir="compile-libs" includes="*.jar"/>
</classpath>
<src path="${source.absolute.dir}" />
<src path="${gen.absolute.dir}" />
<compilerarg line="${java.compilerargs}" />
</javac>
<!-- bunch of if conditions here -->
</target>
</project>
日志:
C:{path}{Class}.java (8:34) 找不到符号类 Activity_
注意:启动AndroidAnnotations注解处理
:“[dummy1343240015623]”类型的未关闭文件;这些类型不会进行注释处理
似乎处理开始之后它找不到Activity_。错误还是按预期?
所有文件都位于正确的位置(\libs 中的 api.jar,\compile-libs 中的 .jar),我终其一生都无法弄清楚。
已编辑:四处闲逛了一下。为 AndroidAnnotations 生成的源文件夹添加了新的property,在-compile 期间将其添加到javac src 路径中,但仍然没有运气。我第一次运行 ant 脚本时,它告诉我它找不到任何生成的类,第二次它告诉我它们都有重复(仍然给我unclsed files for types... 错误消息)。
【问题讨论】:
标签: java android ant android-annotations