一。在file->seting->plugins中加入butterknife下载量最多的;
在model的build.gradle中加入依赖
studio3.0依赖
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.jakewharton:butterknife-compiler:8.8.1'
报错module的defaultConfig添加
implementation 'com.jakewharton:butterknife:8.8.1'
implementation 'com.jakewharton:butterknife-compiler:8.8.1'
报错module的defaultConfig添加
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath = true
}
}
annotationProcessorOptions {
includeCompileClasspath = true
}
}
或者
compile 'com.jakewharton:butterknife:6.1.0'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'