问题
I've been trying to get Android Annotations working on Android Studio v0.8.14 along with Android Annotations 3.1. But for some reason it's not generating the required files. Can someone point me to the right documentation or steps I need to get a project set up.
I've looked around, nothing seems solid.
回答1:
Create root and app build.gradle like:
https://gist.github.com/Pierry/b3eab411c8865573b985
In activity, annotate this with @EActivity(R.layout.activity_my)
, and add library in your classpath (Android studio make automatically), (Right click).
Add in your manifest _ after activity name.
Note: when u change everything in buidle.gradle, usually the line is removed:
compile "org.androidannotations:androidannotations-api:$AAVersion"
You need add it again. Verify always.
来源:https://stackoverflow.com/questions/26705318/android-annotations-with-android-studio