Android Studio 3.5

使用@AutoService(Processor.class)注册annotation processor

Android Plugin for Gradle:   <=3.3.2  && Gradle Version 4.10.2

以上的都是可以的,但是高于以上的版本无论是Gradle Version 还是 Android Plugin for Gradle

在编译的时候都无法调用

自己编写的annotation processor(AbstractProcessor)。

本想发帖问下,stackoverflow推荐了类似的文章,https://stackoverflow.com/questions/44530648/annotation-processor-autoservice

才恍然大悟,Android Plugin for Gradle >= 3.4 或者 Gradle Version >=5.0 都要在自己的annotation processor工程里面增加如下的语句:

annotationProcessor 'com.google.auto.service:auto-service:1.0-rc6'

 

annotation processor 为啥没有被调用?的更多相关文章

  1. Eclipse导入别人的项目报错:Unable to load annotation processor factory 'xxxxx.jar' for project

    使用eclipse导入别人的项目时候,报错Unable to load annotation processor factory 'xxxxx.jar' for project. 解决方案 1.项目右 ...

  2. 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 ...

  3. 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报错,用到注解的 ...

  4. 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 ...

  5. 解决spring boot1.5以上版本@ConfigurationProperties提示“Spring Boot Configuration Annotation Processor not.."

    Springboot1.5以上版本,在使用 @ConfigurationProperties注解的时候会提示“Spring Boot Configuration Annotation Processo ...

  6. idea中的springboot+gradle项目报错springboot configuration annotation processor not found in classpath

    idea中的springboot项目,打开某个类run.halo.app.config.properties.HaloProperties.java,报错(使用gradle编译): springboo ...

  7. SpringBoot中使用@ConfigurationProperties提示:Configuration Annotation Processor not found in classpath

    问题 Springboot1.5以上版本,在使用 @ConfigurationProperties注解的时候会提示Spring Boot Configuration Annotation Proces ...

  8. Unable to load annotation processor factory

    很多人在项目开发中都会遇到项目名称左上角有个红叉,有些是Jar问题,有些是代码问题,有些是编译问题,对于我这种强迫症的是受不了这种情况发生的,如果不影响项目启动还好,废话少说,今天工作就出现了一个问题 ...

  9. 使用@ConfigurationProperties注解 提示 “Spring Boot Configuration Annotation Processor not found in classpath ”

    解决方案: 在 pom.xml 添加依赖 <dependency> <groupId>org.springframework.boot</groupId> < ...

随机推荐

  1. MES应用案例|新宏泰电器乘上智能制造的东风

    企业背景: 无锡新宏泰电器科技股份有限公司(下文简称:新宏泰电器)创立于1984年,公司主要生产断路器.微型电机.BMC/SMC材料.BMC/SMC模压制品及各类塑料模具的设计制造.已于2016年在沪 ...

  2. ES10(2019)有哪些更新和新特性?

    ES10新特性(2019) 行分隔符(U + 2028)和段分隔符(U + 2029)符号现在允许在字符串文字中,与JSON匹配 更加友好的 JSON.stringify 新增了Array的flat( ...

  3. 5.1 dex文件解析

    1.DexHeader结构体占用0x70字节,源码位置 dalvik\libdex\DexFile.h文件中269/* 270 * Direct-mapped "header_item&qu ...

  4. AI的自学题库-竞赛-基础知识

    阿里云(天池): https://tianchi.aliyun.com/course?spm=5176.12281897.0.0.209439a9UwObn3 天池竞赛:https://tianchi ...

  5. 团队——Beta版本发布

    目录 最棒团队成员信息 一.7次冲刺博客链接 二.解决的Alpha版本问题 / Beta计划任务(与Alpha版本不同点) 二.项目本次α版本的发布地址.下载安装说明 四.PM最终报告(详细报告在各冲 ...

  6. vue.js生成纵向拓扑图

    1.前端代码 <link href="https://magicbox.bk.tencent.com/static_api/v3/assets/bootstrap-3.3.4/css/ ...

  7. python的sort和sorted

    sort 只适用于列表,返回列表类型. sorted 可适用于字典,元组和列表. 使用方法 sort的使用方法是list.sort(cmp=None, key=None, reverse=False) ...

  8. C#各版本新增功能

    本系列文章主要整理并介绍 C# 各版本的新增功能. C# 8.0 C#8.0 于 2019年4月 随 .NET Framework 4.8 与 Visual Studio 2019 一同发布,但是当前 ...

  9. Mysql 日常

    Mysql 日常总结 做报表的时候经常会使用 if 来帮助统计 select count(if(key=1,1,NULL)) from atable where ... 当然,也支持选择 select ...

  10. python - 将天数转换成日期

    # 如果是 0 则为今天 def getdate(day): today = datetime.datetime.now() deviation = datetime.timedelta(days=- ...