Android Annotations with android studio

折月煮酒 提交于 2019-12-02 15:04:57

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!