引用
-
Project.gradle中增加
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
如:
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.1'
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
- model.gralde中增加
apply plugin: 'com.neenbedankt.android-apt'
//butterknifeD
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0
- 调用