我想使用适用于 Android 的 Azure 通信 UI 移动库 - 聊天。 https://github.com/Azure/communication-ui-library-android/tree/main/azure-communication-ui/chat#installation
我遵循了每一步(pickFirst、实现、maven url),但是当我尝试启动我的应用程序时,出现以下错误:
Configuration cache state could not be cached: field `__librarySourceSets__`of task`:app:mapDebugSourceSetPaths`of type`com.android.build.gradle.tasks.MapSourceSetPathsTask\`: error writing value of type 'org.gradle.api.internal.file.collections.DefaultConfigurableFileCollection'
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
> Could not find com.microsoft.device:dualscreen-layout:1.0.0-alpha01.
> Searched in the following locations:
> \- https://dl.google.com/dl/android/maven2/com/microsoft/device/dualscreen-layout/1.0.0-alpha01/dualscreen-layout-1.0.0-alpha01.pom
> \- https://repo.maven.apache.org/maven2/com/microsoft/device/dualscreen-layout/1.0.0-alpha01/dualscreen-layout-1.0.0-alpha01.pom
> \- https://plugins.gradle.org/m2/com/microsoft/device/dualscreen-layout/1.0.0-alpha01/dualscreen-layout-1.0.0-alpha01.pom
> Required by:
> project :app \> com.azure.android:azure-communication-ui-chat:1.0.0-beta.2 \> com.microsoft.fluentui:fluentui_others:0.1.2
> project :app \> com.azure.android:azure-communication-ui-chat:1.0.0-beta.2 \> com.microsoft.fluentui:fluentui_others:0.1.2 \> com.microsoft.fluentui:fluentui_core:0.1.7\`
看起来 gradle 没有使用我在前面的步骤中提供的 maven url...
我尝试了一切:
当 Gradle 无法解析所需的依赖项时,就会出现上述错误。找不到
com.microsoft.device:dualscreen-layout:1.0.0-alpha01
已将 Azure Maven 存储库 URL 正确添加到
build.gradle
存储库下的项目级 allprojects
文件中。它应该看起来像这样:
allprojects {
repositories {
// ...
maven {
url 'https://pkgs.dev.azure.com/azure-telephony/public/_packaging/azure-sdk-for-android/maven/v1'
}
}
}
尝试这个不同的版本:
implementation 'com.azure.android:azure-communication-ui-chat:1.0.0-beta.2'
implementation 'com.microsoft.fluentui:fluentui_others:0.1.3' // or a different version
您可以使用 Gradle 的传递依赖排除来传递地排除有问题的依赖。
implementation ('com.azure.android:azure-communication-ui-chat:1.0.0-beta.2') {
exclude group: 'com.microsoft.device', module: 'dualscreen-layout'
}