1.框架注入:
project.gradle中:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
}
}
app.gradle中
implementation 'com.jakewharton:butterknife:8.8.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
注意ButterKnife官网给出的如下不需要添加:
看我的是这样的:
到这里框架准入算是告一个段落了,下面讲插件的使用
2.插件的使用
下面直接上图啦,记住一定要 在布局上右击 点击Generate后点击插件图标即可