aws-samples / amazon-ivs-broadcast-android-sample

MIT No Attribution
10 stars 8 forks source link

Duplicate class org.webrtc.AddIceObserver in flutter_webrtc and com.amazonaws:ivs-broadcast:1.9.0:stages@aar #41

Closed weekend8394 closed 6 months ago

weekend8394 commented 1 year ago

I've encountered a problem with duplicate classes when using the flutter_webrtc and com.amazonaws:ivs-broadcast:1.9.0:stages@aar libraries together in my Flutter project.

In my pubspec.yaml I have: flutter_webrtc: ^0.9.33

And in my build.gradle for Android, I have: implementation('com.amazonaws:ivs-broadcast:1.9.0:stages@aar')

When I attempt to build, I encounter the following error: Duplicate class org.webrtc.AddIceObserver found in modules jetified-android-104.5112.06-runtime (com.github.webrtc-sdk:android:104.5112.06) and jetified-ivs-broadcast-1.9-stages.0-stages-runtime (com.amazonaws:ivs-broadcast:1.9.0)

I've tried to exclude the org.webrtc module from ivs-broadcast library in build.gradle, but the error persists. :implementation('com.amazonaws:ivs-broadcast:1.9.0:stages@aar'){ exclude group: 'org.webrtc', module: 'webrtc' }

Could you please provide any guidance or potential solutions to address this issue?

dang-tommy commented 1 year ago

Hi @weekend8394, sorry for the late response. We don't currently have a workaround for duplicate WebRTC classes, but we are planning to try to fix this issue in the future. Until that work is done, for now the only solution is to use only one of the two libraries. Sorry for the inconvenience.

kvasilye commented 6 months ago

This was fixed a few months ago in version 1.14, and has stayed the same (fix is there) in more recent releases including the 1.16.0 we just published today.

You can now use the IVS Broadcast SDK in the same app with other SDKs which use Google's WebRTC library.

RovaHerve commented 4 months ago

Are the problem is solved ? I have the same issue and I have resolved. Just exclude the webrtc on jitsi meet .

weekend8394 commented 4 months ago

Are the problem is solved ? I have the same issue and I have resolved. Just exclude the webrtc on jitsi meet .

Later, we suspended this function first , so we didn’t use it for the time being , LOL

kvasilye commented 4 months ago

The naming conflict was solved in IVS Broadcast SDK 1.14

Since that version, you can use the IVS Broadcast SDK + any other SDK which uses Google's WebRTC such as Live Kit