I've been looking workaround for the past few days but no avail. I'm using Voximplant only for instant messaging (IM) and wanted to use Sinch for VOIP calls to the other app. As Sinch IM doesn't fit our use case so we used Voximplant for the messaging which I first implemented.
Now I couldn't build with react-native-sinch-voip due to Voximplant SDK also contains VOIP functions, causing both libraries to conflict in WebRTC classes during build.
I managed to solve the conflict in iOS by renaming the CallManager class name but unable to resolve for Android.
Execution failed for task ':app:checkDebugDuplicateClasses'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
> Duplicate class org.webrtc.AddIceObserver found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AndroidVideoDecoder found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AndroidVideoDecoder$1 found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AndroidVideoDecoder$DecodedTextureMetadata found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AndroidVideoDecoder$FrameInfo found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AudioDecoderFactoryFactory found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AudioEncoderFactoryFactory found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AudioProcessingFactory found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AudioSource found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.AudioTrack found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.BaseBitrateAdjuster found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.BitrateAdjuster found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.BuiltinAudioDecoderFactoryFactory found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.BuiltinAudioEncoderFactoryFactory found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
Duplicate class org.webrtc.CallSessionFileRotatingLogSink found in modules jetified-sinch-android-rtc-4.8.6+b14862c-runtime (sinch-android-rtc-4.8.6+b14862c.aar) and jetified-voximplant-sdk-2.27.0-runtime (com.voximplant:voximplant-sdk:2.27.0)
...
I've tried several solution suggested, adding below code to app/build.gradle but couldn't get it work. Not sure if I'm using the right syntax as well. I'm not familiar with native Android, hence seeking for help.
implementation(project(':react-native-voximplant')){
exclude group: 'com.voximplant', module:'org.webrtc.*'
}
configurations {
all*.exclude module: 'org.webrtc.AndroidVideoDecoder'
}
Unfortunately, it is not possible to use Voximplant React Native SDK with other SDKs based on WebRTC. Voximplant SDK is based on specific version of WebRTC library with extra patches and excluding WebRTC native library from Voximplant Android SDK will lead to undefined behavior.
We are currently working on a major update for Voximplant SDK that will allow to use Voximplant messaging API without WebRTC dependency, however it takes several months to complete this version.
Related
Im trying to run my project on a smartwatch on android studio but I keep getting these two errors and I dont know what it is.
Execution failed for task ':app:checkDebugDuplicateClasses'.
A failure occurred while executing com.android.build.gradle.internal.tasks.CheckDuplicatesRunnable
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-26.0.2-runtime (com.android.support:support-compat:26.0.2)
Duplicate class android.support.v4.app.INotificationSideChannel found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-26.0.2-runtime (com.android.support:support-compat:26.0.2)
Duplicate class android.support.v4.app.INotificationSideChannel$Stub found in modules core-1.6.0-runtime (androidx.core:core:1.6.0) and support-compat-26.0.2-runtime (com.android.support:support-compat:26.0.2)
I am facing duplicate classes error while updating facebook Android SDK version com.facebook.android:facebook-android-sdk:15.0.1'
Duplicate class javax.annotation.Generated found in modules jetified-javax.annotation-api-1.3.2 (javax.annotation:javax.annotation-api:1.3.2) and jetified-jsr250-api-1.0 (javax.annotation:jsr250-api:1.0)
I just recently upgraded from Arctic Fox to Dolphin and migrated my project from Gradle 7.0.3 to 7.3.0.
When I want to build project I got error:
Duplicate class androidx.lifecycle.ViewModelLazy found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.4.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.4.0)
Duplicate class androidx.lifecycle.ViewModelProviderKt found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.4.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.4.0)
Duplicate class androidx.lifecycle.ViewTreeViewModelKt found in modules jetified-lifecycle-viewmodel-ktx-2.3.1-runtime (androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1) and lifecycle-viewmodel-2.4.0-runtime (androidx.lifecycle:lifecycle-viewmodel:2.4.0)
My entire project is non-usable and broken right now.
This happened with me when I added the androidx.preference.preference-ktx:1.2.0
dependency in gradle.
Just add this dependency in build.gradle file to fix this.
Java ->
implementation 'androidx.lifecycle:lifecycle-viewmodel:2.5.1'
Kotlin ->
implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.5.1'
This error occurs due to one of the dependencies having an explicit dependency of lifecycle 2.3.1.
Google Tracker Issue Link -> https://issuetracker.google.com/issues/242384116
Hope this helps :)
Following the advice from https://developers.google.com/cast/support, I'm posting this question.
I've developed an Android app that integrates Google Cast functionality. My app also uses protobuf-java:3.9.1 to implement part of its functionality.
This weekend I decided to update the app's dependencies. The app built and worked just fine prior to my attempt to update the dependencies.
I was previously using play-services-cast-framework:17.0.0, and updated this to 17.1.0. When I did this I picked up a transitive dependency on protobuf-lite:3.0.1, which contains classes that conflict with protobuf-java:3.9.1 causing the build to fail.
My question: Is this new dependency on an old version of protobuf a bug introduced in play-services-cast-framework:17.1.0?
Excerpt from the build error messages:
* What went wrong:
Execution failed for task ':mobile:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: Duplicate class com.google.protobuf.AbstractMessageLite found in modules protobuf-java-3.9.1.jar (com.google.protobuf:protobuf-java:3.9.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
Duplicate class com.google.protobuf.AbstractMessageLite$Builder found in modules protobuf-java-3.9.1.jar (com.google.protobuf:protobuf-java:3.9.1) and protobuf-lite-3.0.1.jar (com.google.protobuf:protobuf-lite:3.0.1)
...
There are several more duplicate class errors, which I've omitted.
As reported by the androidDependencies gradle task, when I use cast framework 17.1.0, I pick up the following new dependencies that are not present when I used cast frameworkd 17.0.0:
...
+--- com.google.android.datatransport:transport-backend-cct:2.0.1#aar
+--- com.google.android.datatransport:transport-runtime:2.0.0#aar
...
+--- com.google.android.datatransport:transport-api:2.0.0#aar
+--- com.google.dagger:dagger:2.22#jar
+--- javax.inject:javax.inject:1#jar
+--- com.google.protobuf:protobuf-lite:3.0.1#jar
...
I got error when I use twillio and sora library.
Error:Execution failed for task ':quickstart:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: org/webrtc/Camera1Session$2.class
I've researched and I know that 2 library extend from org.webrtc, so When android system build then I will duplicate org.web.
I spent 3 weeks for this issue, but i cannot resolve.
Any solution would be appreciate
Thank!