android studio 项目集成butterknife

来源:互联网 发布:淘宝我的收货地址在哪 编辑:程序博客网 时间:2024/06/06 17:13

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'}

0 0
原创粉丝点击