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. java集合学习(1):集合框架

    集合 Collection(有时候也叫container)是一个简单的对象, Java集合工具包位于Java.util包下,Java集合主要可以划分为4个部分:List列表.Set集合.Map映射.工 ...

  2. 关于连接不上SVN的部分解决方案——No repository found in svn localhost

    今天如往常一样做事,期间发现一个问题,于是就打算将文件与 svn 上的文件进行对比,可谁成想 Eclipse 突然弹框报错,然后我到SVN资源库中直接刷新打开 svn 的地址,又弹框报错:文件夹不存在 ...

  3. springboot2.1.3 本地加载jar包+打包载入本地jar

    项目已springboot为主,有时候我们需要引入的jar包并非maven公共库中存在(这里不谈私自搭建私库),那我们能否像普通的工程一样,导入自己手动添加的jar包文件呢? 答案是肯定的,来,一起往 ...

  4. 网站 & APP 安利

    https://sitoi.cn/posts/51270.html APP 影视类 影视大院 地址:https://www.vfans.fun 描述:没有上架应用商店,需要安装信任企业证书,VIP资源 ...

  5. linux使用useradd创建的用户没有目录的解决办法

    转载请注明来源https://www.cnblogs.com/sogeisetsu/p/11401562.html或https://blog.csdn.net/suyues/article/detai ...

  6. Python中取整的方法floor,ceil,round

    地板函数:math.floor(4.9)=4 天花板函数: math.ceil(4.1)=5 四舍五入: round(4.5)=4 round(4.6)=5

  7. Locust性能测试6-命令行参数详解

    前言 当我们在linux上使用locust工具压测的时候,会使用no-web模式,然后需要收集运行的日志,方便查找问题. 命令行参数 输入locust --help 查看所有的命令行参数 > l ...

  8. GhostScript命令参数详解(转)

    http://blog.csdn.net/catoop/article/details/42737441 本文列出几个常用参数,然后下面附上官方的参数详解: 一.常用参数解释 这是一个测试的命令:gs ...

  9. html中的数据岛:利用DSO和javascript在html中动态加载和浏览xml数据

    1.DSO也叫做数据源对象,IE 4.0引入了DSO,在IE 5.0对DSO技术进行很大的扩展.以往如果数据是通过SQL语言对数据库进行查询得到的结果,那么就把它们存放在ADO(ActiveX Dat ...

  10. spring Boot + MyBatis + Maven 项目,日志开启打印 sql

    在 spring Boot + MyBatis + Maven 项目中,日志开启打印 sql 的最简单方法,就是在文件 application.properties 中新增: logging.leve ...