4
我正在尝试构建一个包含在Gradle分发中的示例项目。当我做gradle build
我得到这个错误:gradle build failure连接到https://repo1.maven.org拒绝
Could not resolve commons-collections:commons-collections:3.2.1.
Required by:
:application:1.0.2
> Could not HEAD 'https://repo1.maven.org/maven2/commons-collections/commons-collections/3.2.1/commons-collections-3.2.1.pom'.
> Connection to https://repo1.maven.org refused
我背后的代理工作。我试过这里提到的东西: gradle documentation for proxy configuration但我得到了同样的错误。 你能帮忙吗?
您可能需要添加systemProp.http.proxyUser = my_user_name systemProp.http.proxyPassword = my_secret_password ... systemProp .https.proxyUser = my_user_name systemProp.https.proxyPassword = my_secret_password。另外,对于Windows机器,gradle.properties文件位于C:\ Documents and Settings \ myAccount \ .gradle \ gradle.properties中。并检查你有一个“GRADLE_USER_HOME”环境变量指向C:\ Documents and Settings \ myAccount \ .gradle – mycowan
感谢它为我工作:) –