Androidx 依赖重复

2021-01-05  本文已影响0人  周_0717

由于常用的androidx.appcompat:appcompat、androidx.recyclerview:recyclerview依赖库内部包含多个依赖,而这些依赖的更新频率不一致,导致在使用最新稳定版的时候,部分内部依赖版本不一致所以会重复引用。

recyclerview去除非核心依赖:
仅保留androidx.customview和androidx.recyclerview

api (androidx.recyclerview:recyclerview)
      {
         exclude group: 'androidx.annotation'
         exclude group: 'androidx.core'
         exclude group: 'androidx.arch.core'
         exclude group: 'androidx.collection'
         exclude group: 'androidx.lifecycle'
       }

2021-01-05

上一篇 下一篇

猜你喜欢

热点阅读