0
点赞
收藏
分享

微信扫一扫

Android 导入依赖包:Failed to resolve: com.github...

奋斗De奶爸 2022-04-06 阅读 48

gradle导入第三方依赖包,报错Failed to resolve: com.github...

看了很多文章,说放在allprojects{}里,还是不行,然后到处搜,在github看到解决方案,终于解决了。

  1. 在 settings.gradle 添加
dependencyResolutionManagement {
    repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
    repositories {
        google()
        mavenCentral()
        jcenter() // Warning: this repository is going to shut down soon
        maven { url 'https://jitpack.io' }
    }
}

 摘录于:https://github.com/PhilJay/MPAndroidChart/issues/5179

举报

相关推荐

0 条评论