IntelliJIDEA - shiraji/androidannotations GitHub Wiki
Notes
- Please read the Configuration page first
Setting up the project
Please note that there are two important JARs in AndroidAnnotations:
- androidannotations-X.X.X-api.jaris the API JAR, it must be in your build path and will be part of the final APK
- androidannotations-X.X.X.jaris the processor JAR, it is only needed at compile time, and must be in the compiler classpath.
Adding the jars to the projects
- Put androidannotations-X.X.X-api.jarin thelibsfolder
- Put androidannotations-X.X.X.jarin a different folder, such ascompile-libs.androidannotations-X.X.X.jarmust not go in thelibsfolder.
Importing the project into IntelliJ
- Go to File -> Open...
- In the dialog window, select your project folder and click OK
- If the Framework detected popup shows up, click on the Configure link on it, then select the desired Android SDK and click OK
- Open File -> Project structure -> Modules -> Dependencies and add the dependencies from the libsfolder- Click on the green + button
- Select JARs or directories...
- Select the libsfolder -> OK
- Toggle the first checkmark so the jar is exported
 
- Open File -> Settings -> Build, Execution, Deployment -> Compiler -> Annotation processing and add the AndroidAnnotations processor
- Select your project in the left pane
- Toggle Enable annotation processing
- Select Processor path
- Click ... right to Processor path and browse androidannotations-X.X.X.jarfrom thecompile-libsfolder
- Switch the Store generated sources relative to to Module content root
- Close the window by clicking OK
 
- Make the project, this will also launch annotation processing
- Open File -> Project structure -> Modules -> Sources, then right click the generatedfolder and select Source
Next step
- Start using AndroidAnnotations