Android Studio创建项目Error:Server returned HTTP response code: 403 for URL

用Android Studio创建项目,Error:Server returned HTTP response code: 403 for URL: https://services.gradle.org/distributions/gradle-4.1-all.zip

解决方案:

打开gradle-wrapper.properties文件

找到最后一行那个distributionUrl代表的版本号,我的是gradle-4.1-all.zip;

 

distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

1.使用http协议:distributionUrl=http\://services.gradle.org/distributions/gradle-4.1-all.zip

2将gradle-4.1-all.zip下载到本地(使用本地gradle):distributionUrl=file:/Users/tong/Documents/tong/soft/gradle-4.1-all.zip

Android Studio创建项目Error:Server returned HTTP response code: 403 for URL_第1张图片

你可能感兴趣的:(gradle,android,studio)