Android Studio Could not resolve com.android.tools.build:gradle:3.5.3

Android 码拜 8个月前 (03-21) 1040次浏览 0个评论

对我这个安卓小白来说,用着Android Studio太多不顺手,打开一个项目,下面出现了一堆错误:Could not resolve all artifacts for configuration ‘:classpath’. Could not resolve com.android.tools.build:gradle:3.5.3. shows error
Could not resolve com.android.tools.build:gradle:3.5.3.Could not get resource https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom’.
Could not GET ‘https://jcenter.bintray.com/com/android/tools/build/gradle/3.5.3/gradle-3.5.3.pom’. Received status code 400 from server: Bad request
Could not resolve com.google.gms:google-services:4.2.0.Could not get resource ‘https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.2.0/google-services-4.2.0.pom’.
搜了那么久,大概知道原因是网络问题,按网上说的试了多个,愣是没解决,后来按照这个方法改了改,正常了。算我好运
Check your Network Settings -> Proxy -> Use a Proxy Server (TURN IT OFF)
Check Control Panel\Network and Internet\Network Connections -> Ethernet Properties -> IPV4 Properties -> Change to obtained (or you set it with your common network IP)
Open the file gradle.properties location C:\Users\.gradle\ and remove all the settings related to “proxy” which makes the Android error in classpath.
估计是以前我手动配置的proxy导致的问题。改过后,gradle在后台跑了几十分钟,估计网络慢,下载的东西多。


CodeBye 版权所有丨如未注明 , 均为原创丨本网站采用BY-NC-SA协议进行授权 , 转载请注明Android Studio Could not resolve com.android.tools.build:gradle:3.5.3
喜欢 (0)
[1034331897@qq.com]
分享 (0)

文章评论已关闭!