反应本机Android构建失败

反应本机Android构建失败,android,react-native,android-studio,react-native-android,Android,React Native,Android Studio,React Native Android,当我使用android studio构建react原生项目时,我当前遇到了这个错误。如何修复此问题并删除重复项 Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector found in modules imagepipeline-base-2.2.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.2.0) and stetho-2.0

当我使用android studio构建react原生项目时,我当前遇到了这个错误。如何修复此问题并删除重复项

 Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector found in modules imagepipeline-base-2.2.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.2.0) and stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)
    Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector$DumpInfo found in modules imagepipeline-base-2.2.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.2.0) and stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)
    Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector$DumpInfoEntry found in modules imagepipeline-base-2.2.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.2.0) and stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)

我也犯了同样的错误。从
package.json
依赖项中删除以下代码对我很有用:

"react-native-photo-view": "github:shoutem/react-native-photo-view#0ffa1481f6b6cb8663cb291b7db1d6644440584d"

我不太清楚为什么,但可能是因为那就是复制的地方。

我也有同样的错误。从
package.json
依赖项中删除以下代码对我很有用:

"react-native-photo-view": "github:shoutem/react-native-photo-view#0ffa1481f6b6cb8663cb291b7db1d6644440584d"

我不太清楚为什么,但可能是因为复制品就在那里。

这似乎是由于鳍状肢和壁画之间的冲突造成的。将此添加到应用程序级别build.gradle:

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
    exclude group:'com.facebook.fresco'
}

(FLIPPER_版本在gradle.properties中定义为0.33.1)

这似乎是由于FLIPPER和壁画之间的冲突造成的。将此添加到应用程序级别build.gradle:

debugImplementation("com.facebook.flipper:flipper:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-network-plugin:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
}
debugImplementation("com.facebook.flipper:flipper-fresco-plugin:${FLIPPER_VERSION}") {
    exclude group:'com.facebook.fbjni'
    exclude group:'com.facebook.fresco'
}

(FLIPPER_版本在gradle.properties中定义为0.33.1)

你能试试这个吗:我试过这个建议,但他们似乎对FLIPPER有问题。我的问题是关于壁画的问题。我不确定如何以正确的格式删除包您有机会降级到RN 0.61.5吗?我将RN降级到0.61.5,但仍然有相同的错误。我发现这是Shoutem UI库的错误。但我不知道如何修复它。在这里贴了一个后续问题,你能试试这个吗:我试过那个建议,但他们似乎对flipper有问题。我的问题是关于壁画的问题。我不确定如何以正确的格式删除包您有机会降级到RN 0.61.5吗?我将RN降级到0.61.5,但仍然有相同的错误。我发现这是Shoutem UI库的错误。但我不知道如何修复它。在这里发布了一个后续问题当然!很高兴我能帮忙,当然!很高兴我能帮忙。