Received status code XXX from server: authenticationrequired

问题描述

构建android工程失败,报错信息:

A problem occurred configuring root project 'common'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:3.3.2.
     Required by:
         project :
      > Could not resolve com.android.tools.build:gradle:3.3.2.
         > Could not get resource 'http://XXXXXXX/gradle-3.3.2.pom'.
            > Could not GET 'http://XXXXXXX/gradle-3.3.2.pom'. Received status code 407 from server: authenticationrequired

code 是其他值,解决方案也差不多。

自己尝试

确实感觉时代理问题,开始是启用代理的,然后做了如下尝试:
修改 C:\Users\user.gradle\gradle.properties 文件,将其中代理的用户名密码补全
但是修改后,问题又变成了 Received status code 502 from server: notresolvable

脑仁有点疼

解决方案

其实还是代理的问题,自己把代理给关掉
然后把上述的C:\Users\user.gradle\gradle.properties 文件删除,一切归于平静。

你可能感兴趣的:(Received status code XXX from server: authenticationrequired)