azure-sdk-for-android: [BUG] Getting Duplicate Skype classes when including Calling and Chat in same project. Also, can't resolve 1.0.0-beta.8
Describe the bug
We are getting a build error when trying to include both communication calling and chat into the same project. We get the errors below. Also, I am not able to resolve azure-communication-calling:1.0.0-beta.8 even after adding the correct repositories based on the quickstart.
Exception or Stack Trace
Duplicate class com.skype.rt.Auf found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Auf$AppState found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.ConnectivityChangeReceiver found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.FileStat found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$MccMnc found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkCategory found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkConnectionCost found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkConnectionState found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkConnectionSubType found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkConnectionType found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.JniNetworkParams$NetworkRoamingState found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.KeyStoreWrap found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.LeakChecker found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.LogComponent found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.LogFactory found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.LogLevel found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface$GenericNetworkCallback found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface$GenericNetworkCallback$1 found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface$GenericNetworkCallback$2 found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface$NetworkCallback found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetInterface$TransportType found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.NetIntf found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.PowerReceiver found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.ProxyInfo found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.RootToolsHandler found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.RtContext found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$BytePii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$CharPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$DoublePii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$FloatPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$IntegerPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$LongPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$Pii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$ShortPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.Spl$StringPii found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.SysInfo found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.WiFiNetworkState found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Duplicate class com.skype.rt.WiFiNetworkStatus found in modules jetified-azure-communication-calling-1.0.0-beta.7-runtime (com.azure.android:azure-communication-calling:1.0.0-beta.7) and jetified-client-android-0.0.1-beta.1-runtime (com.microsoft.trouter:client-android:0.0.1-beta.1)
Go to the documentation to learn how to Fix dependency resolution errors.
To Reproduce
- Create a new Android project, based on the Quickstart
- Follow steps to include the repositories
- Add the following dependencies:
implementation 'com.azure.android:azure-communication-calling:1.0.0-beta.8' implementation 'com.azure.android:azure-communication-common:1.0.0-beta.8' implementation 'com.azure.android:azure-communication-chat:1.0.0-beta.8'
Code Snippet Project Gradle
plugins {
id 'com.android.application'
}
android {
packagingOptions {
exclude 'META-INF/*'
pickFirst '**/*.so'
exclude 'META-INF/DEPENDENCIES'
exclude 'META-INF/LICENSE'
exclude 'META-INF/license'
exclude 'META-INF/NOTICE'
exclude 'META-INF/notice'
exclude 'META-INF/ASL2.0'
exclude("META-INF/*.md")
exclude("META-INF/*.txt")
exclude("META-INF/*.kotlin_module")
}
compileSdkVersion 30
buildToolsVersion "30.0.2"
defaultConfig {
applicationId "com.example.chatquickstart"
minSdkVersion 22
targetSdkVersion 30
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
}
dependencies {
implementation 'com.azure.android:azure-communication-calling:1.0.0-beta.8'
implementation 'com.azure.android:azure-communication-common:1.0.0-beta.8'
implementation 'com.azure.android:azure-communication-chat:1.0.0-beta.8'
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'com.google.android.material:material:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
testImplementation 'junit:junit:4.+'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
}
Module Gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven {
url 'https://trouterpublicpackages.z13.web.core.windows.net'
}
mavenCentral()
}
dependencies {
classpath "com.android.tools.build:gradle:4.1.3"
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven {
url 'https://trouterpublicpackages.z13.web.core.windows.net'
}
mavenCentral()
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Expected behavior We expect the build to complete successfully
Screenshots
Setup (please complete the following information):
- OS: OSX 11.2.3
- IDE : Android Studio
- 1.0.0-beta.7 & 1.0.0-beta.8
Additional context
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (8 by maintainers)
If I recall correctly, the Trouter dependency in Chat is used for getting real-time notifications, so as you correctly point out, by excluding it you don’t have access to said feature. That said, you can still make use of push notifications, so you still have a way of getting said notifications, albeit in a different fashion.
It’s been a while since I laid my eyes on these libraries, so I’ll defer to @jiminwen-msft from ACS Chat and @gaobob-msft from ACS Calling to see if there’s currently a way of using both libraries without losing functionality on either side.
Had to use
1.0.0-beta.6for chat in order for it to work with calling1.0.0-beta.8