问题描述
我似乎无法得到构建工具最新的摇篮,在所有。我怀疑它是与代理服务器设置摇篮。我有一个很好看在线,但仍不能似乎找到一个解决方案。我用摇篮2.1。
I cant seem to get build tools for the latest gradle at all. I suspect its something to do with proxy setting for gradle. I have had a good look online but still cant seem to find a solution. I use gradle 2.1.
我在/home/user/.gradle文件夹中使用这些设置创建gradle.properties文件。
I created gradle.properties file in my /home/user/.gradle folder with these setting.
systemProp.http.proxyHost =代理 systemProp.http.proxyPort = 80 systemProp.http.proxyUser =名为myusername systemProp.http.proxyPassword =密码
systemProp.https.proxyHost =代理 systemProp.https.proxyPort = 80 systemProp.https.proxyUser =名为myusername systemProp.https.proxyPassword =密码
systemProp.https.proxyHost=proxy systemProp.https.proxyPort=80 systemProp.https.proxyUser=myusername systemProp.https.proxyPassword=password
下面是我的世界的 build.gradle
buildscript {
repositories {
mavenLocal()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.13.0'
classpath fileTree(dir: 'build-libs', include: '*.jar')
}
}
allprojects {
repositories {
mavenCentral()
}
}
这里是运行grawlew当我得到的错误 无法HEAD'https://repo1.maven.org/maven2/com/android/tools/build/gradle/0.13.0/gradle-0.13.0.pom'.对未通过身份验证
And here is the error i get when running grawlew Could not HEAD 'https://repo1.maven.org/maven2/com/android/tools/build/gradle/0.13.0/gradle-0.13.0.pom'.peer not authenticated
我在想什么?该行家链接在浏览器中打开罚款。
What am i missing? that maven link opens fine in a browser.
推荐答案
右林不知道这是否会为别人,而是为我工作。
Right im not sure if it will work for others but worked for me.
我改变proxyPort为8080和使用jcenter替代的Maven。但我不得不申请expeption使用HTTP,而不是HTTPS。这是我在我的 gradle.build 作为构建脚本和allprojects
I changed proxyPort to 8080 and used jcenter instead of Maven. But i had to apply expeption to use HTTP instead of HTTPS. This is what i have in my gradle.build for build script and allprojects
buildscript {
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
allprojects {
repositories {
jcenter {
url "http://jcenter.bintray.com/"
}
}
}
更新:06/08
我最近更新的摇篮和插件版本,并出现了一些问题。有人抱怨插件的 com.android.application
I have recently updated Gradle and plugin version and had some problems. It was complaining about plugin com.android.application
我做了一些周围挖,改变
I did some digging around and changed
jcenter {
url "http://jcenter.bintray.com/"
}
到
repositories {
maven { url 'http://repo1.maven.org/maven2' }
}
这篇关于未能解决所有依赖关系配置“:类路径”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!