androidazureazure-android-sdk

NoClassDefFoundError: Failed resolution of: Lcom/microsoft/trouterclient/registration/ISkypetokenProvider


I'm trying to use azure chat and calling in the same application. Right now I'm getting an error

java.lang.NoClassDefFoundError: Failed resolution of: Lcom/microsoft/trouterclient/registration/ISkypetokenProvider;
    at com.azure.android.communication.chat.ChatAsyncClient.<init>(ChatAsyncClient.java:50)
    at com.azure.android.communication.chat.ChatClientBuilder.buildAsyncClient(ChatClientBuilder.java:233)

https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/chat/get-started the QuickStart library suggested I exclude files from dependency like below and this is causing the issue I'm seeing.

implementation 'com.azure.android:azure-communication-calling:2.0.0'
implementation 'com.azure.android:azure-communication-common:1.0.1'
implementation 'org.slf4j:slf4j-log4j12:1.7.29'
implementation ("com.azure.android:azure-communication-chat:1.1.0-beta.4") {
    exclude group: 'com.microsoft', module: 'trouter-client-android'
}

If I try to remove this though I will receive this error

Duplicate class com.skype.rt.WiFiNetworkState found in modules jetified-azure-communication-calling-2.0.0-runtime (com.azure.android:azure-communication-calling:2.0.0) and jetified-trouter-client-android-0.1.1-runtime (com.microsoft:trouter-client-android:0.1.1)

Am I using the wrong versions or is there a different solution to this?


Solution

  • Chat for azure can't work with the real time notification functionality in android as of that version.

    https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/chat/get-started?tabs=windows&pivots=programming-language-android#receive-chat-messages-from-a-chat-thread