首页 > 学院 > 开发设计 > 正文

ButterKnife 8.5.1 依赖配置

2019-11-09 18:36:29
字体:
来源:转载
供稿:网友

官方: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'
发表评论 共有条评论
用户名: 密码:
验证码: 匿名发表