按照列出的所有步骤here后,我发现我的(Class)_仍未生成。未使用Ant编译的Android注释
自定义规则:
<?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:{路径} {}类的.java(8:34)无法找到符号类Activity_
注:启动AndroidAnnotations注释处理
:类型'[dummy1343240015623]'的未关闭文件;这些类型不会发生注释处理
看来,开始处理后无法找到Activity_。错误还是按照预期?
所有的文件都在正确的位置(\ libs中的api.jar,\ compile-libs中的.jar),并且不能为我的生活找出任何东西。
被修改:稍微捅了一下。在AndroidAnnotations生成的源文件夹中添加了一个新的property
,并在-compile
期间将其添加到javac
src
路径中,但仍然没有运气。这是我第一次运行ant脚本,它告诉我找不到任何生成的类,第二次,它告诉我,我有他们所有的重复(仍然给我unclsed files for types...
错误信息)。