我想将Azure Communication UI移动的库用于Android -聊天。https://github.com/Azure/communication-ui-library-android/tree/main/azure-communication-ui/chat#installation
我遵循了每一步(pickFirst,implementation,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文件同步,
- 使缓存无效并重新启动..
1条答案
按热度按时间ajsxfq5m1#
当Gradle无法解析必需的依赖项时,会发生上述错误。找不到
com.microsoft.device:dualscreen-layout:1.0.0-alpha01
已将Azure Maven存储库URL正确添加到
allprojects
存储库下的项目级build.gradle
文件。它应该看起来像这样:试试这个不同的版本:
您可以使用Gradle的可传递依赖项排除来可传递地排除有问题的依赖项。