Received status code 400 from server: Bad Request解决方案

时间:2024-03-15 15:36:40

Received status code 400 from server: Bad Request解决方案


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。

  1. 先添加maven { url ‘http://maven.aliyun.com/nexus/content/groups/public/’ }这个阿里云的镜像,现在好像就这个好用了;
    Received status code 400 from server: Bad Request解决方案
  jcenter {url "http://jcenter.bintray.com/"}
  maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }

2.如果之前配置了代理,先在setting中设置Http Proxy为No Proxy 。
Received status code 400 from server: Bad Request解决方案
然后检查下gradle.properties文件。文件位置在C:\Users***.gradle\gradle.properties,将最后四行配置代理的代码删除。
Received status code 400 from server: Bad Request解决方案
3、在设置里面把仓库启用
Received status code 400 from server: Bad Request解决方案

4、如果以上三步还不行,有可能网速太慢,插有线试试哈。

最后,我们还可以翻,翻完之后设置HTTP Proxy,host为本地127.0.0.1,端口可能是1080,也可能是别的,看翻得设置哈。