现在的ButterKnife,跟之前有点不一样、繁琐。
为了方便大家的使用特意整理了一下:
代码在最下方。
步骤图下:
1、导入依赖
2、添加一些插件:
Configure your project-level build.gradle to include the 'android-apt' plugin:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}
}
Then, apply the 'android-apt' plugin in your module-level build.gradle and add the Butter Knife dependencies:
apply plugin: 'android-apt'
android {
...
}
dependencies {
compile 'com.jakewharton:butterknife:8.4.0'
apt 'com.jakewharton:butterknife-compiler:8.4.0'
}

480

被折叠的 条评论
为什么被折叠?



