Android utdid冲突:Duplicate class com.ta.utdid2

项目集成支付宝支付后运行报了类冲突,报错如下:

Duplicate class com.ta.utdid2.a.a.a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.b found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.b$a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.b$b found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.b$c found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.c found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.d found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.e found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.f found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.a.a.g found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.b found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.b$a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.b$b found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.c found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.d found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.d$a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.d$a$a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.b.a.e found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.UTDevice found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.a found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.b found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.c found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.d found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ta.utdid2.device.e found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ut.device.AidCallback found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ut.device.AidConstants found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)
Duplicate class com.ut.device.UTDevice found in modules jetified-alipaysdk-15.8.02.210308182128-runtime (alipaysdk-15.8.02.210308182128.aar) and jetified-utdid-1.5.2.1 (com.umeng.umsdk:utdid:1.5.2.1)

是阿里的aar包和友盟的utdid的包有部分类冲突了,经过搜索和自己的的测试,注释调友盟的utdid的包即可

//友盟基础库相关依赖(必须)
api 'com.umeng.umsdk:common:9.3.7'
implementation 'com.umeng.umsdk:asms:1.2.1'
//implementation 'com.umeng.umsdk:utdid:1.5.2.1'

完美解决,经测试不影响友盟相关功能

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值