首先在build.gradle中添加依赖:
compile 'com.jakewharton:butterknife:7.0.1'
或者
compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
然后添加ButterKnife插件,用法参见这个地址:
大功告成!!!
PS:按照GitHub用法就可以了,要不然会有很多莫名其妙的错误