ButterKnife 8.5.1 依赖配置

前端之家收集整理的这篇文章主要介绍了ButterKnife 8.5.1 依赖配置前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

官方:github

1.Project的build.gradle文件增加classpath

// Top-level build file where you can add configuration options common to all sub-projects/modules. buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:2.2.0'
        classpath 'com.jakewharton:butterknife-gradle-plugin:8.5.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

2.在Module的build.gradle文件增加plugin

apply plugin: 'com.jakewharton.butterknife'

3.在Dependencies中添加依赖配置

compile 'com.jakewharton:butterknife:8.5.1'
annotationProcessor 'com.jakewharton:butterknife-compiler:8.5.1'
原文链接:https://www.f2er.com/javaschema/283361.html

猜你在找的设计模式相关文章