Duplicate class xxxx found in modules
Android 项目中引入了logback日志管理库来管理日志implementation 'org.slf4j:slf4j-api:1.7.25'implementation 'com.github.tony19:logback-android:2.0.0'引入后报错Duplicate class org.slf4j.impl.StaticLoggerBinder found in module
文章共301字 · 阅读需要大约2分钟
一键AI生成摘要,助你高效阅读
问答
·
Android 项目中引入了logback日志管理库来管理日志
implementation 'org.slf4j:slf4j-api:1.7.25'
implementation 'com.github.tony19:logback-android:2.0.0'
引入后报错
Duplicate class org.slf4j.impl.StaticLoggerBinder found in modules
jetified-logback-android-2.0.0-runtime.jar
(com.github.tony19:logback-android:2.0.0)
and jetified-slf4j-android-1.7.21.jar (org.slf4j:slf4j-android:1.7.21)
查找原因,之前引入国视频缓存库 com.danikula:videocache:2.7.0 发现该库用依赖于 org.slf4j:slf4j-android:1.7.21。导致库冲突 修改放发,在引入时候去除。如下
implementation ('com.danikula:videocache:2.7.0') {
exclude group: 'org.slf4j'
}
更多推荐
已为社区贡献1条内容
所有评论(0)