关于ButterKnife 8.4.0以后版本报空指针的解决办法:
1. 新版的ButterKnife在使用是需要在app的build.gradle中
1.dependencies{...}添加
```
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
```
2.在`apply plugin: 'com.android.application'`代码之下添加:
`apply plugin: 'com.neenbedankt.android-apt`'
如下代码:
```
apply plugin: 'com.neenbedankt.android-apt'
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:24.1.1'
compile project(':baselibrary')
compile 'com.android.support:recyclerview-v7:24.1.1'
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}
```
同时需要在项目的build.gradle的dependencies{…}添加
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'