Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've gotten it working, with some minor issues (which might just be related to my setup, your milage may vary)</p> <p>Ok, so :</p> <ol> <li>Get the <code>androidannotation-(vernum).jar</code> and the api jar</li> <li>Save your <code>androidannotation-(vernum).jar</code> inside your project somewhere but not in your <code>libs</code> folder. (I saved it in a separate "aa" folder)</li> <li>Save the api jar in your "libs" folder</li> <li>Go to the Intellij <code>Settings/preferences</code> screen. Under <code>Compiler &gt; Annotation Processors</code> are the settings you want. Adjust profiles so the annotations processing can be run on the right modules.</li> <li>You then enable annotation processing and set the processor path to the location of <code>androidannotation-(vernum).jar</code></li> <li>you store generated sources relative to your module content root</li> <li>Now here's where problems for me started. Intellij gave me first errors of not finding the <code>AndroidManifest</code> file, and it gave duplicate class errors. To solve issue 1 I added the processor option <code>androidManifestFile</code> and set the absolute path of the xml file. The second issue was solved by outputting the generated sources to the <code>gen</code> folder. (this folder is also used by Android compiling for generating R.class and such)</li> <li>Afterwards, build your entire project. Normally <code>gen</code> should be set up as a source folder in your module already.</li> </ol> <p>If you got some other issues, let me know, I've been fiddling with it for the past few days. My current only "bug" is that whenever I modify sources that use AndroidAnnotations, I have to rebuild my entire project, instead of just my main module. It seems that Intellij 12 does not reprocess the annotations on module building.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload