偶尔在GitHub上搞点代码瞅瞅,AS升级3.0之后带入经常吃点这样那样的错误:

Annotation processors must be explicitly declared now.  The following dependencies on the compile classpath are found to contain annotation processor.  Please add them to the annotationProcessor configuration.  - butterknife-7.0.1.jar (com.jakewharton:butterknife:7.0.1)Alternatively, set android.defaultConfig.javaCompileOptions.annotationProcessorOptions.includeCompileClasspath = true to continue with previous behavior.  Note that this option is deprecated and will be removed in the future.See https://developer.android.com/r/tools/annotation-processor-error-message.html for more details.

大概意思是:

注释处理器现在必须显式声明。发现编译类路径的下列依赖关系包含注释处理器。请将它们添加到注释处理器配置中。

处理:

在app的build中 android {
    ...
    defaultConfig {
        ...
        //添加如下配置

       javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
    }
}
 

更多相关文章

  1. Android消息机制 空闲消息处理器
  2. Android中子线程网络查看器与Handler消息处理器
  3. Android 的res/values/colors自定义颜色列表和注释表及布局文件
  4. Android 总结:打造Android中的流式布局和热门标签(源码有详细注释)
  5. IllegalStateException,PatternSyntaxException,Android studio 注
  6. Android studio中新建类时自动生成注释的设置
  7. Android系统配置数据库注释(settings.db)
  8. 参考注释郭霖老师的Android相机程序
  9. Android 初学入门代码注释 学习笔记001 16.03.18

随机推荐

  1. mySQL服务器连接,断开及cmd使用操作
  2. 深入了解mysql索引
  3. 怎样安全地关闭MySQL实例
  4. MySQL 表的垂直拆分和水平拆分
  5. C++连接使用MySQL的方法
  6. 详解MySQL 慢查询
  7. MySQL多表查询详解下
  8. MySQL多表查询详解上
  9. MySQL Innodb 存储结构 和 存储Null值 用
  10. MySQL中建表时可空(NULL)和非空(NOT NULL)的