首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Android studio以下三个依赖关系解析失败

Android studio以下三个依赖关系解析失败
EN

Stack Overflow用户
提问于 2021-05-23 03:51:02
回答 1查看 285关注 0票数 1
代码语言:javascript
运行
复制
dependencies {
...

implementation 'androidx.lifecycle:lifecycle-extensions:2.2.0'

implementation 'androidx.lifecycle:lifecycle-viewmodel-ktx:2.3.1'

//Lifecycle Extensions
    implementation "android.arch.lifecycle:extensions:2.1.1"

//VegaLayoutManager
    implementation "com.stone.vega.library:VegaLayoutManager:1.0.6"

//Algolia Search
    implementation "com.algolia:instantsearch-android:2.4.0"

...
}

当我在android studio中我的项目的build.gradle(模块)文件中添加这三个依赖项并同步它时,我得到了3个“无法解析”这三个依赖项的警告。

当我运行我的项目时,我得到这个错误:

代码语言:javascript
运行
复制
Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find android.arch.lifecycle:extensions:2.1.1.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/android/arch/lifecycle/extensions/2.1.1/extensions-2.1.1.pom
       - https://repo.maven.apache.org/maven2/android/arch/lifecycle/extensions/2.1.1/extensions-2.1.1.pom
       - https://jitpack.io/android/arch/lifecycle/extensions/2.1.1/extensions-2.1.1.pom
       - https://maven.google.com/android/arch/lifecycle/extensions/2.1.1/extensions-2.1.1.pom
     Required by:
         project :app
   > Could not find com.stone.vega.library:VegaLayoutManager:1.0.6.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/stone/vega/library/VegaLayoutManager/1.0.6/VegaLayoutManager-1.0.6.pom
       - https://repo.maven.apache.org/maven2/com/stone/vega/library/VegaLayoutManager/1.0.6/VegaLayoutManager-1.0.6.pom
       - https://jitpack.io/com/stone/vega/library/VegaLayoutManager/1.0.6/VegaLayoutManager-1.0.6.pom
       - https://maven.google.com/com/stone/vega/library/VegaLayoutManager/1.0.6/VegaLayoutManager-1.0.6.pom
     Required by:
         project :app
   > Could not find com.algolia:instantsearch-android:2.4.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/algolia/instantsearch-android/2.4.0/instantsearch-android-2.4.0.pom
       - https://repo.maven.apache.org/maven2/com/algolia/instantsearch-android/2.4.0/instantsearch-android-2.4.0.pom
       - https://jitpack.io/com/algolia/instantsearch-android/2.4.0/instantsearch-android-2.4.0.pom
       - https://maven.google.com/com/algolia/instantsearch-android/2.4.0/instantsearch-android-2.4.0.pom
     Required by:
         project :app
Possible solution:
 - Declare repository providing the artifact, see the documentation at https://docs.gradle.org/current/userguide/declaring_repositories.html

我已经检查了这些依赖项的版本,所有的版本都存在。我在kotlin版本1.5.0中使用它们。“不能解决依赖”是什么意思?我应该如何解决这个问题?

EN

回答 1

Stack Overflow用户

发布于 2021-10-06 09:05:44

Gradle查看多个存储库来查找您的依赖项。在您的示例中,它在您在repositories部分中声明的任何存储库中都没有找到这些内容。

您可以检查可用的版本:InstantSearch AndroidLifecycle

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/67653599

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档