Dagger2的基本配置
2017-07-14 13:39
85 查看
AS2.2 及以上版本Dagger2的基本配置
本文原创,未经同意不得转载(做个记录方便以后回顾)AS2.2之前的版本请戳
http://blog.csdn.net/lisdye2/article/details/51942511使用Eclipse开发的小伙伴请绕道
正文只需要在模块的build.gradle 的dependencies中添加:
compile ‘com.google.dagger:dagger:2.10’
annotationProcessor ‘com.google.dagger:dagger-compiler:2.10’
完整代码
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { exclude group: 'com.android.support', module: 'support-annotations' }) compile 'com.android.support:appcompat-v7:25.3.1' compile 'com.android.support:support-v4:25.3.1' compile 'com.android.support:design:25.3.1' compile 'com.android.support.constraint:constraint-layout:1.0.2' testCompile 'junit:junit:4.12' //Dagger2配置 compile 'com.google.dagger:dagger:2.10' annotationProcessor 'com.google.dagger:dagger-compiler:2.10' }
相关文章推荐
- javaWeb基本的pom.xml配置
- IPABLES基本配置与说明(自己整理)
- HTTP基础及基本配置
- PHP基本配置--POST文件上传修改
- Zookeeper的安装配置及基本开发
- Packet Tracer 5.0实验(一) 交换机的基本配置与管理
- SpringMVC基本配置
- BGP基本配置的方法
- Struts2基本配置
- SQL Server 2005镜像配置基本概念
- Nginx的基本配置
- 5 -- Hibernate的基本用法 --4 深入Hibernate配置文件
- Spring框架学习一----基本配置
- vsftpd基本配置
- CCNA实验之交换机基本配置命令
- ehcache基本配置
- resin4基本配置信息
- mybatis系列(一)--初识mybatis,以及mybatis的基本配置和执行
- Linux3.4内核的基本配置和编译
- SCCM 2012 基本配置