当前位置:   article > 正文

解决Unknown host jcenter.bintray com You may need to adjust the proxy setting

解决Unknown host jcenter.bintray com You may need to adjust the proxy setting

有时候从GitHub上下的项目加载老半天依赖下不下来,主要报以下错误

Unknown host 'jcenter.bintray.com'. You may need to adjust the proxy settings in Gradle.
Enable Gradle 'offline mode' and sync project
Learn about configuring HTTP proxies in Gradle

或者如下错误

ERROR: Failed to resolve: com.google.guava:guava:27.0.0-android
Show in Project Structure dialog
Affected Modules: app

解决办法只要在项目项目build.gradle文件中添加maven { url"https://jitpack.io"}即可

buildscript {
    repositories {
        google()
        jcenter()
        maven {url"https://jitpack.io"}
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.3.0'
    }
}
 
allprojects {
    repositories {
        google()
        jcenter()
        maven {url"https://jitpack.io"}
    }
}

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/713488
推荐阅读
相关标签
  

闽ICP备14008679号