【问题标题】:Could not find com.github.ybq:Android-SpinKit:1.4.0找不到 com.github.ybq:Android-SpinKit:1.4.0
【发布时间】:2021-12-15 03:23:10
【问题描述】:

我试图包含 spinkit,但是当我构建项目时它给了我错误

Execution failed for task ':app:checkDebugAarMetadata'.
> Could not resolve all files for configuration ':app:debugRuntimeClasspath'.
   > Could not find com.github.ybq:Android-SpinKit:1.4.0.
     Searched in the following locations:
       - https://dl.google.com/dl/android/maven2/com/github/ybq/Android-SpinKit/1.4.0/Android-SpinKit-1.4.0.pom
       - https://repo.maven.apache.org/maven2/com/github/ybq/Android-SpinKit/1.4.0/Android-SpinKit-1.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

我不知道为什么它突然发生了

【问题讨论】:

  • 你添加mavenCentral()了吗?
  • 不,因为他们说你必须只在 gradle 模块应用程序中实现这一行
  • 是的,我已经检查了 build gradle 在存储库和所有项目中都有 mavenCentral()
  • 好的,我已经尝试过使用其他 github 依赖项,但同样的问题正在发生不知道该怎么办我重新安装了 android studio,但问题仍然存在

标签: android dependency-injection dependencies


【解决方案1】:

使用 Android Studio 北极狐 2020.3.1

不要在您的项目级 gradle 文件中添加 maven { url "https://jitpack.io" },而是将其添加到 settings.gradle

在settings.gradle

repositories {
        google()
        mavenCentral()
        maven { url "https://jitpack.io" }
        jcenter() // Warning: this repository is going to shut down soon
    }

这解决了我和你一样的问题。

【讨论】:

    猜你喜欢
    • 2014-10-22
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-07-03
    • 2018-04-28
    • 1970-01-01
    • 2020-03-28
    • 1970-01-01
    相关资源
    最近更新 更多