Error : Program type already present: XXXX

Android 开发中经常会遇到 AS 报这个类型的错误,不要慌,这个错误的意思是:你的项目里面存在重复依赖的问题。举个例子:

implementation 'com.github.ifmvo:Matthew_ImageLoader:1.1.3'implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.43-alpha1'

假如你的项目里面添加了两个依赖,并且这两个依赖里面同时存在另外一种依赖

implementation 'androidx.appcompat:appcompat:1.0.2'

这种情况下编译就会报出 Error : Program type already present: XXXX 这个异常。

那怎么解决这个问题呢?既然是同时存在导致的冲突,那么删除掉一个不就行了么!

implementation 'com.github.ifmvo:Matthew_ImageLoader:1.1.3'implementation ('com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.43-alpha1'){    exclude group: 'com.android.support', module: 'support-annotations'}

implementation 'com.github.CymChad:BaseRecyclerViewAdapterHelper:2.9.43-alpha1'implementation ('com.github.ifmvo:Matthew_ImageLoader:1.1.3'){    exclude group: 'com.android.support', module: 'support-annotations'}

这个异常就解决了!

更多相关文章

  1. 没有一行代码,「2020 新冠肺炎记忆」这个项目却登上了 GitHub 中
  2. 不吹不黑!GitHub 上帮助人们学习编码的 12 个资源,错过血亏...
  3. Ubuntu中 android 安装(JDK+ECLIPSE+ANDROID)
  4. Android项目打包遇com.android.builder.internal.aapt.v2.Aapt2E
  5. 升级到3.6.3 之后,原项目出现错误 Found tag id where item is ex
  6. [Android]错误: -source 1.7 中不支持 lambda 表达式 (请使用 -s
  7. 【报错问题】 - React native Android(安卓)Invariant Violation
  8. android studio错误: 常量字符串过长
  9. android as gradle 使用过称中 错误处理

随机推荐

  1. Freeline快速集成
  2. Android实现关机与重启的几种方式(推荐)
  3. “Google 救不了 Android”
  4. ExpandableListView用法和实例
  5. Android开发者必备的42个链接
  6. HAXM is not working and emulator runs
  7. Android应用层View绘制流程与源码分析
  8. Android(安卓)客服端集成高德定位功能(And
  9. android开发-使用Dialog AlertDialog
  10. Android应用程序包解析过程浅析