Butter Knife:8.0.1的完整正确导入步骤,附加AS3.0之后的变更

来源:互联网 发布:傣族 知乎 编辑:程序博客网 时间:2024/04/30 04:51

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'


CSDN不知道咋了底下这英文就是删除不了,也是醉了

dependencies