AndroidAnnotations with Kotlin


#1

Hi I’m trying to start an Annotated activity (@EActivity) with this

LoginActivity_.intent(this).start()

but when I run the app i’m getting the following error:

Error:(99, 35) Unresolved reference: LoginActivity_
Error:Execution failed for task ‘:app:compileDebugKotlinAfterJava’.
Compilation error. See log for more details

I’ve already configured the Kotlin plugin into Android project correctly because the other functions of kotlin works fine.

If i start the activity with Anko:

startActivity< LoginActivity >()

It works but i need the annotated activity LoginActivity_


#2

Hi, please make sure that you are using kapt instead of apt in build.gradle.

Like this:

dependencies {
    kapt "org.androidannotations:androidannotations:$AAVersion"
    compile "org.androidannotations:androidannotations-api:$AAVersion"
}

#3

Yes i’m using kapt instead of apt already

thanks anyway