2

I am using

com.quickblox:quickblox-android-sdk-videochat-webrtc:3.9.1 for Chat

and

org.jitsi.react:jitsi-meet-sdk:2.10.0 //for Meeting

but unable to resolve these issues

Duplicate class org.webrtc.AndroidVideoDecoder found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AndroidVideoDecoder$1 found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AndroidVideoDecoder$DecodedTextureMetadata found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AndroidVideoDecoder$FrameInfo found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AudioProcessingFactory found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AudioSource found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.AudioTrack found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.BaseBitrateAdjuster found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.BitrateAdjuster found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.CallSessionFileRotatingLogSink found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.CalledByNative found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.CalledByNativeUnchecked found in modules jetified-google-webrtc-1.0.25003-runtime (org.webrtc:google-webrtc:1.0.25003) and jetified-react-native-webrtc-1.84.0-jitsi-5385907-runtime (com.facebook.react:react-native-webrtc:1.84.0-jitsi-5385907) Duplicate class org.webrtc.Camera1Capturer found in modules jetified-google-webrtc-1.0.25003-runtime

Umer Waqas
  • 1,794
  • 1
  • 12
  • 15

1 Answers1

5

Probably a late answer but for future reference, both of the dependencies are using WebRtc as a transitive dependency and thus duplicate classes

implementation ('org.jitsi.react:jitsi-meet-sdk:2.10.0') {
    transitive = true
    exclude group: 'com.facebook.react', module: 'react-native-webrtc'
}
Mirwise Khan
  • 1,317
  • 17
  • 25
  • I'm getting the same error but couldn't get it work. `Duplicate class org.webrtc.AndroidVideoDecoder found in modules jetified-sinch-android-rtc-3.17.5-runtime (sinch-android-rtc-3.17.5.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)` Tried > `implementation(project(':react-native-voximplant')){ transitive = true exclude group: 'com.voximplant', module:'org.webrtc.AndroidVideoDecoder' }` – Annie Tan Jan 05 '22 at 07:49
  • 1
    @AnnieTan I had to dig deeper into `org.jitsi.react` jar to find the duplicate classes that were causing the problem. In your case, it's a totally different library that you are using. Therefore, this answer will not work for you. You have to figure out duplicates in the Jar file and exclude them using `exclude group`. – Mirwise Khan Jan 30 '22 at 07:44