androidstudi3.0 butterknife的使用

来源:互联网 发布:c .net php开发招聘 编辑:程序博客网 时间:2024/05/16 06:35
一。在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添加

javaCompileOptions {
    annotationProcessorOptions {
        includeCompileClasspath = true
    }
}
或者
compile 'com.jakewharton:butterknife:6.1.0'   
annotationProcessor 'com.jakewharton:butterknife-compiler:8.4.0'
 

原创粉丝点击