如何正确配置IntelliJ IDEA以处理Android注释?

Mat*_*adt 4 android intellij-idea android-annotations

如何正确配置IntelliJ IDEA以处理注释?

使用maven目标processor:process工作正常,但如何在不使用IntelliJ IDEA中的maven目标的情况下处理(使用它的注释处理首选项)?

在IntelliJ的首选项/注释处理器下,我有以下设置:" Enable annotation processing"选中,选项" Obtain processors from project classpath"

我将" Annotation Processors"部分留空,因为我应该通过类路径自动找到它.在处理过的模块下,我选择我的Android模块,然后选择' target/generated-sources/apt'作为' Generated Sources Directory Name'.

在我的项目结构中,我设置了模块依赖项" Maven: com.googlecode.androidannotations:androidannotations:2.6"和" Maven: com.googlecode.androidannotations:androidannotations:api:2.6",以便我在类路径中拥有处理器.

但是构建项目不会处理注释,而是会收到警告' Annotation processing without compilation requested but no processors were found.'

如果我尝试手动将注释处理器设置为' com.googlecode.androidannotations.AndroidAnnotationProcessor'并选择' /path/to/libs/androidannotations-2.6-api.jar'作为处理器的路径,那么com.googlecode.androidannotations.AndroidAnnotationProcessor在尝试构建项目时,我会收到错误" 未找到注释处理器" .

这是我在截图中的配置:http://imageshack.us/photo/my-images/841/intellijaa.png/

在此输入图像描述

Mat*_*adt 5

我仍然没有使用"Obtain processors from project classpath"它,但它现在正在工作时手动选择路径/ jar到处理器.

我之前曾尝试过,但我的错误是我选择了AA-api.jar而不是常规的AA.jar.

感谢Dave,他通过AA google群组的截图提示:

https://groups.google.com/forum/?fromgroups#!topic/androidannotations/PnAWuSQHkhg