微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

android 关于插件包内的依赖版本不一致问题得解决

前言

今天使用一个插件包的时候,依赖包冲突了,在此记录一下。

正文

在引用一个:

debugImplementation 'com.squareup.leakcanary:leakcanary-android:2.2'

然后报错出现冲突。

Duplicate class okio.AsyncTimeout found in modules ksoap2-android-assembly-3.6.3-jar-with-dependencies.jar (ksoap2-android-assembly-3.6.3-jar-with-dependencies.jar) and okio-2.2.2.jar (com.squareup.okio:okio:2.2.2)

那么你要做的事是移除它,让两者存在一个

debugImplementation ('com.squareup.leakcanary:leakcanary-android:2.2',{
    exclude group: 'com.squareup.okio', module: 'okio'
  })

这个怎么写的呢?根据后面的(com.squareup.okio:okio:2.2.2) 中的内容

然後又有一個錯誤:

org.aspectj.weaver.BCException: Whilst processing type 'Lleakcanary/internal/activity/screen/HeapAnalysisFailureScreen$createView$1$1$1;'

发现了这个问题,这种问题,没有固定格式,想快速解决最好去官网issue那里看一下。

aspectjx { exclude 'com.squareup' exclude 'leakcanary' }

同样是冲突了,把冲突项目移除即可。

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐