二维码、Logger日志、Butterknife

来源:互联网 发布:英语文章带翻译软件 编辑:程序博客网 时间:2024/06/06 23:57
二维码 实现大全
library下载

https://github.com/zxing/zxing


zxing 开发api文档
http://blog.csdn.net/qq_23547831/article/details/52037710

logger日志工具的使用
https://github.com/orhanobut/logger

butterknife 工具使用

第一步添加依赖

implementation 'com.jakewharton:butterknife:8.8.1'implementation 'com.jakewharton:butterknife-compiler:8.8.1'

使用就是这样 
接下来是解决报错

Annotation processors must be explicitly declared now.The following dependenciesonthe compile classpath are found tocontain annotation processor.Please add themtothe annotationProcessor configuration. - butterknife-7.0.1.jar Alternatively,set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath =truetocontinuewith previous behavior. Notethat this option is deprecated and will be removed inthe future.
  • 1
  • 2
  • 3
  • 4
  • 5

解决方法 
在module的build.gradle中添加如下代码 
需要添加在Android目录下的defaultconfig中添加

javaCompileOptions {    annotationProcessorOptions {        includeCompileClasspath = true    }}


http://blog.csdn.net/wyj1369/article/details/78451017