环境

Android Studio 3.0
Gradle 3.0.0
gradle 4.1

Error

   Error:Execution failed for task ':app:javaPreCompileAnzhiDebug'.
> 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.

解决

javaCompileOptions {
// 显式声明支持注解
annotationProcessorOptions {
includeCompileClasspath false
}
}

AndroidFine Error:Annotation processors must be explicitly declared now.的更多相关文章

  1. Error:Annotation processors must be explicitly declared now.

    环境 Android Studio 3.0 Gradle 3.0.0 gradle 4.1 Error Error:Execution failed for task ':app:javaPreCom ...

  2. Android Studio错误日志-注解报错Annotation processors must be explicitly declared now.

    导入项目时,发现之前项目的butter knife报错,用到注解的应该都会报错Error:Execution failed for task ':app:javaPreCompileDebug'.&g ...

  3. AS使用lombok注解报错:Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

    Rebuild时报错信息如下所示: Error:Execution failed for task ':app:javaPreCompileDebug'.> Annotation process ...

  4. AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

    把Androidstudio2.2的项目放到3.0里面去了,然后开始报错了. 体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的 ...

  5. AndroidStudio3.0 注解报错Annotation processors must be explicitly declared now. The following dependencies on the compile classpath are found to contain annotation processor.

    体验最新版AndroidStudio3.0 Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错 Error:Execution failed for task ...

  6. AndroidStudio3.0 Canary 8注解报错Annotation processors must be explicitly declared now.

    体验最新版AndroidStudio3. Canary 8的时候,发现之前项目的butter knife报错,用到注解的应该都会报错 Error:Execution failed for task ' ...

  7. 【Android】编译报错 Annotation processors must be explicitly declared now 解决方案

    问题 在网上下载一个demo,因为版本久远,里面添加了本地 Butter Knife 的jar包,在编译时报错 Annotation processors must be explicitly dec ...

  8. Android Studio 3.0+ Annotation processors must be explicitly declared now

    把Android Studio 升级到3.0+ 版本的时候出现该问题:   可以看到 给了我们两种解决办法:   1. 即 给出现问题的三方 加上 annotationProcessor配置     ...

  9. Java Annotation Processors

    Table Of Contents 1. Introduction 2. When to Use Annotation Processors 3. Annotation Processing Unde ...

随机推荐

  1. 【Java架构:基础技术】一篇文章搞掂:Spring Boot 官方文档解读

    本文篇幅较长,建议合理利用右上角目录进行查看(如果没有目录请刷新). 本文内容大部分是翻译和总结官方文档,可以到https://docs.spring.io/spring-boot/docs查看(此地 ...

  2. python join函数

    join()函数 语法:  'sep'.join(seq) 参数说明sep:分隔符.可以为空seq:要连接的元素序列.字符串.元组.字典上面的语法即:以sep作为分隔符,将seq所有的元素合并成一个新 ...

  3. php打包下载文件

    使用前请先开启:查看下php.ini里面的extension=php_zip.dll前面的分号有没有去掉; $zip=new \ZipArchive(); $zifile = 'download/' ...

  4. 用 Flask 来写个轻博客 (4) — (M)VC_创建数据模型和表

    目录 目录 前文列表 扩展阅读 定义数据模型 models 创建表 前文列表 用 Flask 来写个轻博客 (1) - 创建项目 用 Flask 来写个轻博客 (2) - Hello World! 用 ...

  5. sublime useful packages

    Package control Prefixr Emmet

  6. .net Core 在 CentOS7下,报The type initializer for 'Gdip' threw an exception.异常

    .net Core允许在 Centos7 上,使用 System.Draw.Common类库时,报以下错误: "Class":"System.TypeInitializa ...

  7. 【lua学习笔记】——在sublime中配置Lua运行环境

    一.让Sublime可以运行lua脚本 打开sublime 选择tools-->Build System-->New Build System   在新出现的文件中输入如下内容: { &q ...

  8. Python数字类型及数学运算

    1.数字类型分为int.float和complex,complex暂时用不到,int和float的相关运算和类型转换如下: >>> 59+12 71 >>> 59- ...

  9. yum安装LAMP

    安装LAMP环境二进制包安装,先更新yum源,PHP 7.0.33 扩展可选 yum -y install mysql mysql-server mysql-devel httpd httpd-dev ...

  10. img点击放大的js实现

    业务需要,从后台获取图片列表,用img标签展示,由于图片太小看不清,需要点击放大,类似如下效果: 点击后放大(由于图片高度超出了页面,需要通过overflow:auto;设置滚动条,点击放大图片回到列 ...