删除全局gradle属性文件中的代理设置~/.gradle/gradle.properties
将这个文件中的代理设置删除即解决问题,不知道在setting中设置了不启用代理为什么还启用,这问题导致找了很久,记录一下
> Could not resolve com.android.tools.build:gradle:4.2.2.
> Could not get resource 'https://maven.aliyun.com/repository/public/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Could not GET 'https://maven.aliyun.com/repository/public/com/android/tools/build/gradle/4.2.2/gradle-4.2.2.pom'.
> Connect to mirrors.neusoft.edu.cn:80 [mirrors.neusoft.edu.cn/219.216.128.25] failed: Connection refused: connect