AS3.0以前:
1.在module的build.gradle中
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8'
}在project的build.gradle中
apply plugin: 'com.neenbedankt.android-apt'
dependencies {
compile 'com.jakewharton:butterknife:8.0.1'
apt 'com.jakewharton:butterknife-compiler:8.0.1'
} AS3.0以后:
把module里dependencies里的classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' 删除
把project里的apply plugin: 'com.neenbedankt.android-apt'删除 且把dependencies里的
apt 'com.jakewharton:butterknife-compiler:8.0.1'
改成
annotationProcessor'com.jakewharton:butterknife-compiler:8.0.1'
本文详细介绍了在Android Studio 3.0及更高版本中,如何正确导入并使用Butter Knife库的8.0.1版本。主要内容包括删除旧依赖,添加新的annotationProcessor依赖。
1073

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



