Alex Rivera | Logout

Android Studio: Use AndroidAnnotations

Asked 2013-05-16T00:12:36.117
19

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?

Edit
Report

1 Answer

0

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 :

buildscript {
    repositories {
        mavenCentral()
    }

    def gradleAndroidAnnotationsPluginVersion = '0.3.0'

    dependencies {
        classpath "net.ealden.gradle.plugins:gradle-androidannotations-plugin:$gradleAndroidAnnotationsPluginVersion"
    }
}

apply plugin: 'androidannotations'
apply plugin: 'idea'

androidAnnotationsVersion = '2.2'

I didn't try this new IDE yet. I'll check that soon.

answered 2013-05-16T07:48:51.833

Your Answer