Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fresco 2.5.0 & Flipper 0.102.0 Duplicate class error CountingMemoryCacheInspector #2683

Closed
scottkruse opened this issue Aug 11, 2021 · 12 comments

Comments

@scottkruse
Copy link

scottkruse commented Aug 11, 2021

馃悰 Bug Report

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

To Reproduce

Add latest Flipper version and latest Fresco version to Android project via Gradle + Groovy (non .KTS) and attempt to run project

Environment

  • Kotlin 1.4.32
  • Flipper 0.102.0
  • Fresco 2.5.0
@passy
Copy link
Member

passy commented Aug 12, 2021

I wonder if @oprisnik has an overview of where that class is currently used and why this is popping up now. We're currently com.facebook.stetho as transitive dependency:

https://github.com/facebook/flipper/blob/master/android/plugins/fresco/build.gradle#L29

@oprisnik
Copy link
Contributor

Hi! If I look at your error, I see com.facebook.fresco:stetho:2.0.0. Can you try and use 2.5.0 there as well? Might be because of the version mismatch.

@princefishthrower
Copy link

princefishthrower commented Oct 15, 2021

I'm getting this identical error after upgraded to React Native 0.66... problem is I don't even find com.facebook.fresco:stetho anywhere in my project 馃槄

EDIT: Found the fix by creating a fresh React Native project and comparing the Android gradle files. Turns out I was using a very old version of Flipper. Upgrading to the Flipper to the version used by React Native 0.66.0 (at the time of writing this that was version 0.99.0), i.e. in android/gradle.properties:

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0

@sajibsaha4647
Copy link

@princefishthrower Thank you. it works for me.

@Yandamuri
Copy link

@princefishthrower How to find the suitable Flipper version as per React-Native.

below are my specifications,

   react-native: 0.62.2, 
   FLIPPER_VERSION=0.33.1

Am I using right Flipper version?

@Yandamuri
Copy link

@princefishthrower How to find the suitable Flipper version as per React-Native.

below are my specifications,

   react-native: 0.62.2, 
   FLIPPER_VERSION=0.33.1

Am I using right Flipper version?

@princefishthrower Can you please help me here if possible?

@Yandamuri
Copy link

@princefishthrower How to find the suitable Flipper version as per React-Native.

below are my specifications,

   react-native: 0.62.2, 
   FLIPPER_VERSION=0.33.1

Am I using right Flipper version?

@sajibsaha4647 Can you please help me here if possible?

@Yandamuri
Copy link

@princefishthrower How to find the suitable Flipper version as per React-Native.
below are my specifications,

   react-native: 0.62.2, 
   FLIPPER_VERSION=0.33.1

Am I using right Flipper version?

@princefishthrower Can you please help me here if possible?

@princefishthrower Can you please help me here if possible?

@Yandamuri
Copy link

@princefishthrower How to find the suitable Flipper version as per React-Native.
below are my specifications,

   react-native: 0.62.2, 
   FLIPPER_VERSION=0.33.1

Am I using right Flipper version?

@sajibsaha4647 Can you please help me here if possible?

@sajibsaha4647 Can you please help me here if possible?

@c-goettert
Copy link

c-goettert commented Apr 26, 2022

@Yandamuri for those questions rn-upgrade-helper really provides good help. For RN 0.62.2 it tells me to use FLIPPER_VERSION=0.33.1, so yeah, you are using the right version (see gradle.properties file of RN 0.62.2).

@mahisaajy
Copy link

I'm getting this identical error after upgraded to React Native 0.66... problem is I don't even find com.facebook.fresco:stetho anywhere in my project 馃槄

EDIT: Found the fix by creating a fresh React Native project and comparing the Android gradle files. Turns out I was using a very old version of Flipper. Upgrading to the Flipper to the version used by React Native 0.66.0 (at the time of writing this that was version 0.99.0), i.e. in android/gradle.properties:

# Version of flipper SDK to use with React Native
FLIPPER_VERSION=0.99.0

Thank you. I am using react native version 0.62.2 and IT WORKS if i use FLIPPER_VERSION=0.99.0
I dont know why, but it works.
For project React Native Jitsi Meet ExampleApp

@MursiDirect
Copy link

MursiDirect commented Feb 27, 2023

Duplicate class com.facebook.imagepipeline.cache.BitmapMemoryCacheFactory found in modules jetified-imagepipeline-2.0.0-runtime (com.facebook.fresco:imagepipeline:2.0.0) and jetified-imagepipeline-base-2.5.0-runtime (com.facebook.fresco:imagepipeline-base:2.5.0)

FLIPPER_VERSION=0.162.0
"react-native": "0.64.2"

Any solution please

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants