butterknife初始化
2016-09-18 10:53
239 查看
1.安装插件
2.工程build加入
3.app build加入
4.app build加入
5.最后直接鼠标定位到
2.工程build加入
buildscript { repositories { jcenter() } dependencies { classpath 'com.android.tools.build:gradle:1.5.0' classpath 'com.neenbedankt.gradle.plugins:android-apt:1.8' // 添加这行 // NOTE: Do not place your application dependencies here; they belong // in the individual module build.gradle files } }
3.app build加入
apply plugin: 'com.android.application'
apply plugin: 'com.neenbedankt.android-apt' //添加这行
4.app build加入
dependencies { compile fileTree(dir: 'libs', include: ['*.jar']) testCompile 'junit:junit:4.12' apt 'com.jakewharton:butterknife-compiler:8.4.0'compile 'com.jakewharton:butterknife:8.4.0' }
5.最后直接鼠标定位到
setContentView(R.layout.xxx)中点击右键generate,然后下面有个generate butternife
相关文章推荐
- maven的坐标,仓库介绍及配置
- 七种CSS方式让一个容器水平垂直居中
- 详解JS函数重载
- javascript函数能重载吗?
- Cannot create __weak reference in file using manual refrence counting
- ifeq ifneq ifdef ifndef
- jquery获取复选框选中的值
- React Native BUG(001)
- Web服务器是如何使用JSP来创建网页
- JavaScript 基础(004_作用域)
- AnjularJS中$scope和$rootScope的区别小结
- Json转换成字符串
- Js绑定事件的几种方式
- CSS margin 与 padding法含义
- Django返回json数据用法示例
- 前端防止重复提交场景
- javascript 理解对象--- 属性类型
- 第五节 浮动
- JS 中判断空值 undefined 和 null
- jsPatch 文件加密方式