您的环境
Plugin version: 2.5.6
Platform: Android
OS version: windows
React Native version: 0.63.2
上下文
当我想构建一个 apk 或使用 react-native run android 运行我的项目时,它会因@mauron85/react-native-background-geolocation 和 react-native-linear-gradient 之间的冲突而失败,并且当我删除其中之一时他们每件事都运行得很完美 预期行为
我喜欢为我的应用程序生成一个 apk 或在我的设备上运行它,但是... 实际行为
这是它给我的错误
任务“:app:checkReleaseDuplicateClasses”执行失败。
1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class org.slf4j.impl.StaticLoggerBinder found in modules logback-android-1.1.1-9-runtime.jar (com.github.tony19:logback-android:1.1.1-9) and slf4j-simple-1.7.25.jar (org.slf4j:slf4j-simple:1.7.25)
Duplicate class org.slf4j.impl.StaticMDCBinder found in modules logback-android-1.1.1-9-runtime.jar (com.github.tony19:logback-android:1.1.1-9) and slf4j-simple-1.7.25.jar (org.slf4j:slf4j-simple:1.7.25)
Duplicate class org.slf4j.impl.StaticMarkerBinder found in modules logback-android-1.1.1-9-runtime.jar (com.github.tony19:logback-android:1.1.1-9) and slf4j-simple-1.7.25.jar (org.slf4j:slf4j-simple:1.7.25)
可能的修复
我想知道如何解决这个 org.slf4j 的冲突
@mauron85/react-native-background-geolocation 正在使用 slf4j 1.7.25 和 react-native-linear-gradient 使用 slf4j 1.7.21 反之亦然,我记错了