So I wanted to try the new Android Studio and imported my eclipse projects (I generated a gradle build file). Worked pretty good.
The only library which does not seem to work is AndroidAnnotations. I selected the androidannotations-2.7.jar file under File > Settings > Compiler > Annotation Processing.
As production source directory i selected "gen". But the generated file like MainActivity_ are not generated. What did I wrong?
This is what works for me:
After that I need to mark
build/sources/apt-generated/debug
as source in Android Studio by right clicking it and selectingMark Directory as
>Source Root
If you don't have problems compiling and just after seeing the generated classes in the IDE, then you need to check if target/generated-sources/annotations is checked as Source Folder.
That would be File > Project Structure > Modules > Sources Tab, then look for the folder and tag it as Sources. The folder will turn blue and will be listed on the Source Folder list.
If you try to use Android Studio with a project running Android Annotations, you may run into a cryptic compiler issue:
incorrectly typed data found for annotation element public abstract int com.googlecode.androidannotations.annotations.EActivity.value() (Found data of type int)
Problem is the R class is not found. Android Studio doesn't place the R.java into the gen directory by default like eclipse. The solution is to go into Project Settings -> Facets -> Select the Android facet for your project -> Compiler tab, and change the "R.java and Manifest.java files" from "Run process-resources Maven task before Make" to "Generated by IDE".
I had the same issues, followed the instructions for configuring aa with intelliJ, now it works like a charm does.
AA intelliJ config page will point you to this post...
http://www.ashokgelal.com/2012/12/setting-up-intellij-idea-12-with-maven-actionbarsherlock-roboelectric-androidannotations/
...the above post walks you through setting up various libs in intelliJ, scroll towards the bottom for AA.
The main thing I had to do that I did not have to do in eclipse was go to Preferences > Compiler > Annotation Processors and set my Processor Path to something like...
As Android Studio is based on IntelliJ did you try to follow the configuration guideline on AndroidAnnotation's wiki ?
If you're using gradle you should check this page which explains how to configure the AndroidAnnotation's plugin :
I didn't try this new IDE yet. I'll check that soon.
It seems there is a way of making Android Studio work with AndroidAnnotations
http://code.google.com/p/android/issues/detail?id=55764