当我尝试同步项目时,所有库都会返回400错误代码。
例如:
Error:A problem occurred configuring project ':app'.
Could not resolve all files for configuration ':app:classpath'.
Could not download gradle-retrolambda.jar (me.tatarka:gradle-retrolambda:3.7.0)
Could not get resource 'https://jcenter.bintray.com/me/tatarka/gradle-retrolambda/3.7.0/gradle-retrolambda-3.7.0.jar'.
Could not HEAD 'https://jcenter.bintray.com/me/tatarka/gradle-retrolambda/3.7.0/gradle-retrolambda-3.7.0.jar'. Received status code 400 from server: Bad Request
答案 0 :(得分:3)
Check to see if the agent has been set up for your computer's C:\Users\***\.gradle gradle.properties file.Delete the last four lines if you have the following code.
systemProp.https.proxyPort=80
systemProp.http.proxyHost=mirrors.neusoft.edu.cn
systemProp.https.proxyHost=mirrors.neusoft.edu.cn
systemProp.http.proxyPort=80
答案 1 :(得分:1)
对于遇到我的问题的任何人。我通过删除代理来解决问题已在gradle.properties
文件中设置