赞
踩
今天用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
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。