Library配置
library module里添加:
api 'com.jakewharton:butterknife:8.8.1'
// annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
app module 内引用 annotationProcessor
annotationProcessor 'com.jakewharton:butterknife-compiler:8.8.1'
其它在项目gradle添加classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
buildscript {
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.jakewharton:butterknife-gradle-plugin:8.8.1'
}
}
注:Android Studio版本3.1,其它版本未验证。其实就是annotationProcessor移到app module
网友评论