android studio 配置 AndroidAnnotation
来源:互联网 发布:汕头大学有编程专业吗 编辑:程序博客网 时间:2024/05/18 00:30
一、新建一个android studio项目
二、打开build.gradle
添加下面这句话:classpath 'com.neenbedankt.gradle.plugins:android-apt:1.4' (有的说是:classpath 'com.neenbedankt.gradle.plugins:android-apt:1.3' 可能版本不同,我的用1.3会出现问题)
三、打开项目中的build.gradle
加入下面红框中的内容
1、
apply plugin: 'android-apt'
def AAVersion = '3.0.1'
2、
apt "org.androidannotations:androidannotations:$AAVersion"
compile "org.androidannotations:androidannotations-api:$AAVersion"
3、
apt {
arguments {
androidManifestFile variant.outputs[0].processResources.manifestFile
// androidManifestFile variant.processResources.manifestFile
resourcePackageName 'com.example.zhangchangan.demo'
}
}
以上三步就已经配置完了,完成后,点击下面的按钮,编译一下,如果不出现问题,就可以使用@EActivity(R.layout.xxx)了,不要忘了在清单文件中的java类后面加“_”
- android studio 配置 AndroidAnnotation
- Android Studio下配置AndroidAnnotation
- Android Studio下配置AndroidAnnotation
- Android studio 下 配置AndroidAnnotation 环境
- Android studio正确配置AndroidAnnotation注解
- Android Studio2.2.3配置androidannotation框架
- AndroidAnnotation配置与使用
- AndroidStudio配置Androidannotation
- AndroidAnnotation 在AS中的配置
- 用AndroidAnnotation简化Android开发
- AndroidAnnotation环境配置、插件安装(android eclipse 没有Annotation Processin选项)
- Android Studio:Android Studio 配置
- androidAnnotation 在androidstudio 中配置的正确配置,绝对可用
- Android Studio配置
- Android Studio 一些配置
- Android Studio安装、配置
- Android Studio安装、配置
- android studio配置sdk
- matlab c++ 混合编程初始设置
- STM32关于GPIO的问题
- [Java开发之路]反射机制
- MonkeyRunner源码分析
- 耶鲁女孩刘畅教你循序渐进背单词
- android studio 配置 AndroidAnnotation
- 深入浅出ARC[1] – ARC是什么?
- LTE仿真程序-系统参数-LTE_params
- SSH和JSF+EJB+JPA的比较
- UILabel的自适应高度iOS7.0以上版本
- platform驱动管理机制
- c++虚函数用法
- 利用 frameset 框架实现切换网页时不刷新背景音乐(不会中断)
- cmd 匿名发邮件