Android Annotations是什么?
AndroidAnnotations is an Open Source framework that speeds up Android development. It takes care of the plumbing, and lets you concentrate on what’s really important. By simplifying your code, it facilitates its maintenance.
Android Annotations 是一个开源的框架,用于加速 Android 应用的开发,可以让你把重点放在功能的实现上,简化了代码,提升了可维护性
Android Annotations开源项目
官网:http://androidannotations.org/
github:https://github.com/excilys/androidannotations
github获取代码:
git clone https://github.com/excilys/androidannotations.git
Android Annotations环境配置
配置环境:eclipse
如果是直接导入官方提供的androidannotations/examples/HelloWorldEclipse的列子,则只需要设置source directory就可以了
导入example的设置步骤:
鼠标右击项目,选择Properties(快捷键Alt+Enter),进入设置界面,设置如下选项就可以了
新建项目配置
第1步:导入下载的annotations jar包
第2步:在project中clean一下项目,就不会报错了,annotations就会生成代码,生成的代码就是多了一个下划线”_”
第3步:鼠标右击项目,选择Properties(快捷键Alt+Enter),进入设置界面,导入compile-libs和source目录