亲宝软件园·资讯

展开

Gradle build 报错 Gradle build 报错:Received status code 400 from server

奇怪的叔叔 人气:0

全部错误是这样的:

Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.1.2/gradle-3.1.2.pom'. Received status code 400 from server: Bad Request。

遇到这个错了以后,我先后做了以下尝试:

最后这一步拯救了浪费了一整个下午排错的我。所以最后我遇到的问题是:

Gradle不知道在什么时候被配置了一个错误的代理!Gradle的代理配置路径是:

C:\Users\***\.gradle\gradle.properties

## For more details on how to configure your build environment visit
# http://www.gradle.org/docs/current/userguide/build_environment.html
#
# Specifies the JVM arguments used for the daemon process.
# The setting is particularly useful for tweaking memory settings.
# Default value: -Xmx1024m -XX:MaxPermSize=256m
# org.gradle.jvmargs=-Xmx2048m -XX:MaxPermSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8
#
# When configured, Gradle will run in incubating parallel mode.
# This option should only be used with decoupled projects. More details, visit
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
#Tue May 15 12:14:36 CST 2018
systemProp.https.proxyPort=80
systemProp.http.proxyHost=mirrors.neusoft.edu.cn
systemProp.https.proxyHost=mirrors.neusoft.edu.cn 
systemProp.http.proxyPort=80

删除最后四行的代理就恢复正常了!

到此这篇关于Gradle build 报错:Received status code 400 from server的文章就介绍到这了,更多相关Gradle build 报错内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持! 

加载全部内容

相关教程
猜你喜欢
用户评论