导入butterknife的步骤
2018-12-11 本文已影响0人
啤酒小龙虾
1.在根项目中
classpath'com.jakewharton:butterknife-gradle-plugin:8.5.1'

2.app gradle中
//导入butterkuife
compile'com.jakewharton:butterknife:8.8.1'
annotationProcessor'com.jakewharton:butterknife-compiler:8.8.1'

3.不要忘记在上方也要添加
applyplugin:'com.jakewharton.butterknife'//导入butterkuife

4.使用
//绑定初始化ButterKnife 在onCreate方法中
ButterKnife.bind(this);