android 踩坑

1. 报错提示Error:android-apt plugin is incompatible with the Android Gradle plugin.  Please use 'annotationProcessor' configuration instead.

2. 报错原因:经过查找发现,在Studio升级到3.0之后原来的配置方式apt与最新版本Gradle已经不兼容,推荐使用annotationProcessor,

3.解决报错

一、把project目录下的build.gradle中如果有添加配置:请classpath ‘com.neenbedankt.gradle.plugins:android-apt:1.8'删除掉;

二、把具体Module目录下的build.gradle中如果有添加配置:请apply plugin: ‘com.neenbedankt.android-apt’删除;

三、同时把dependencies中原来使用apt

implementation 'com.google.dagger:dagger:2.16'
apt 'com.google.dagger:dagger-compiler:2.16'

改为annotationProcessor

 

implementation 'com.google.dagger:dagger:2.16'
annotationProcessor 'com.google.dagger:dagger-compiler:2.16'

然后Sync Now即可。

 

 


2、java.lang.NoSuchMethodError: No static method with(Landroid/content/Context;)Lcom/squareup/picasso/Picasso;


As I figured out this is the actual problem, when develop the com.daimajia.slider.library they used  com.squareup.picasso inside their library, but com.daimajia.slider.library developer stop update after version 1.1.5@aar therefore this library required old version of com.squareup.picasso library

Therefoer you can't use com.daimajia.slider.library with latest (2.71828) com.squareup.picasso (If your using both library same time) you can use picasso 2.3.2 or 2.5.2 with daimajia library without any issues.

 

 

【ERROR】
Incremental annotation processing requested, but support is disabled because the following processors are not incremental: android.databinding.annotationprocessor.ProcessDataBinding
【解决方案】
这是 kotlin-gradle-plugin 1.3.50 版本的一个bug。
gradle.properties 文件中添加 kapt.incremental.apt = false 来禁用增量注解处理 或者 将 kotlin_version 版本降低。
【问题】如何查看kotlin-gradle-plugin的版本号
工程-builde.gradle-------------换成1.3.20
————————————————
版权声明:本文为CSDN博主「乐玩兔」的原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/qq_34334548/article/details/101051361

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值