问题
Since ADT 23, there seems to have no way to add Annotation Processor Factory Path to projects:
No "Annotation Processing" item in Poject>Properties>Java Compiler.
Does anyone know how to add androidannotations-X.X.X-api.jar to the annnotaions processing in the last Eclipse ADT?
回答1:
This is a known problem of the ADT bundle, and will be fixed as of ADT 23.0.3. In the meantime, you can fix this by downloading a standard Eclipse distribution and installing the ADT plugin to that. Or if you want to use your existing ADT bundle, you can install the necessary JDT plugin as described here.
Also please note that you do not have to add the androidannotations-X.X.X-api.jar as you written in the OP. You have to add the androidannotations-X.X.X.jar to the annotation processing factories and androidannotations-X.X.X-api.jar to your classpath (libs).
回答2:
i am using ADT23 with Eclipse Luna.
Go to your project properties and select Java Compiler
and select you Compiler Compliance Level
to 1.6.
Then your Annotation Processing
option will be enable.
Create a folder compile-libs
in your project, where your lib
folder and paste jar
file androidannotations-3.0.1.jar
this location compile-libs\androidannotations-3.0.1.jar
.
Add androidannotations-api-3.0.1.jar
in your project libs\androidannotations-api-3.0.1.jar
.
Finally, you must add both file path in your Factory Path.
e.g {Your Project}/compile-libs/androidannotations-3.0.1.jar
and
{Your Project}/libs/androidannotations-api-3.0.1.jar
来源:https://stackoverflow.com/questions/24570629/androidannotations-eclipse-configuration-with-adt-23