我试图在android设备上播放一个动态的webp文件。我正在使用react-native-animated-webp软件包,但我在构建应用程序时出错了。
当我将以下行添加到app/build.gradle文件中时:
implementation("com.facebook.fresco:fresco:2.0.0")
// For animated GIF support
implementation 'com.facebook.fresco:animated-gif:2.0.0'
// For WebP support, including animated WebP
implementation 'com.facebook.fresco:animated-webp:2.3.0'
implementation 'com.facebook.fresco:webpsupport:2.3.0'我发现了一个错误:
* What went wrong:
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.facebook.imagepipeline.cache.CountingMemoryCacheInspector found in modules imagepipeline-base-2.3.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.3.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.3.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.3.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.3.0-runtime.jar (com.facebook.fresco:imagepipeline-base:2.3.0) and stetho-2.0.0-runtime.jar (com.facebook.fresco:stetho:2.0.0)以前有没有人面临过这个问题?我该怎么解决呢?
发布于 2021-11-02 09:12:49
我将Flipper版本升级到FLIPPER_VERSION=0.99.0,然后弗雷斯科版本从2.0.0升级到2.5.0,然后cd android && ./gradlew clean对我起作用
https://stackoverflow.com/questions/69807077
复制相似问题