项目集成支付宝支付后运行报了类冲突,报错如下:
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'
完美解决,经测试不影响友盟相关功能