AndroidAnnotations & IntelliJ IDEA [UPDATE]
Setup IntelliJ IDEA to work with Android Annotations:
- Download libraries: archive with JAR’s is here - download it and - CAUTION - file
androidannotations-X.X.X-api.jar
must be put in libs directory of project, and forandroidannotations-X.X.X.jar
file a new directory must be created (e.g.ext-libs
- what is thea idea of this - description here). - Add
androidannotations-X.X.X-api.jar
tolibraries
of project and default module. - Set annotations compilation.
- During the first compilation there could be a compilation error - fix it by adding suffix to default activity in
AndroidManifest.xml
(e.g.MainActivity_
instead ofMainActivity
). AA generates additional classes in gen directory, and those all classes have _ suffix. - If the project still gets compilation error, switch default activity for other with no AA implementation or create temporary one, rebuild, and switch back to main one with suffix.
For more suggestions please check this site.
Happy injection!