buildscript{
repositories{
mavenCentral()
}
dependencies{
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
2.然后在module的build.gradle添加如下代码
apply plugin: 'android-apt'
dependencies{
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}