Error:Execution failed for task ':app:javaPreCompileDebug'.
> 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-6.0.0.jar (com.jakewharton:butterknife:6.0.0)
  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 {
        ...
        //添加如下配置就OK了
        javaCompileOptions { annotationProcessorOptions { includeCompileClasspath = true } }
    }
    ...
}

更多相关文章

  1. Android(安卓)Studio App LinearLayout多层布局嵌套
  2. android 报错Attempt to invoke virtual method
  3. Android(安卓)- 自定义标题栏(TitleBar)
  4. Cocos2d-x & NDK
  5. Android(安卓)Setting中添加解除屏幕锁选项
  6. Android(安卓)获取闹钟引发的血案
  7. Android(安卓)CTS 测试总结
  8. Android中添加布局和初始化布局总结
  9. Android(安卓)SystemUI状态栏添加图标

随机推荐

  1. Android 中的缓存机制与实现
  2. 十年心得:一个优秀Android开发人员必须注
  3. 2019年Android版本分布(市场占有率、市场
  4. Android线程间的通信
  5. 对于Android DEX文件详细说明
  6. 基于Android Studio的Android第一个软件-
  7. Android Sensor详解(8)sensor hal层分析第
  8. Android[中级教程]第五章 XML解析之PULL
  9. Android通知示例(一)
  10. Android传感器概述(七)