当前位置:   article > 正文

不联网情况下解决 Unknown host 'services.gradle.org'.You may need to adjust the proxy settings in Gradle问题_configuring http proxies in gradle

configuring http proxies in gradle

今天用android studio1.5打开一个android studio2.3创建的项目时,gradle构建时出现了一个这样的问题:

Unknown host 'services.gradle.org'. You may need to adjust the proxy settings in Gradle.

learn about configuring HTTP proxies in Gradle.


解决方法:

1、在android studio1.5下打开一个可用的项目或创建一个hello world

2、修改项目根目录下build.gradle中的dependencies

buildscript {
    repositories {
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:1.5.0'


        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

为android studio1.5中的版本

3、修改项目根目录下gradle\wrapper\gradle-wrapper.properties的distributionUrl的gradle版本


distributionUrl=https\://service

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

闽ICP备14008679号