请注明出处:http://blog.csdn.net/qq_23179075/article/details/60751553
1.在项目Project中的build.gradle中加入:
buildscript {
repositories {
jcenter()
}
dependencies {
...
classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
...
}
}
2.在Module中的build.gradle中加入butterknife插件:
apply plugin: 'com.jakewharton.butterknife'
3.在Module中的build.gradle中加入依赖:
dependencies {
...
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
}
4.Android ButterKnife Zelezny下载安装插件:
直接看图:
5.Android ButterKnife Zelezny插件使用: