Android Studio Gradle插件不能更新的解决方法cause:unable to find valid certification path to requested target

在我们第一次安装Android Studio或者更新Android Studio插件的时候经常会由于网络的原因导致gradle插件下载不成功。
从而导致报Cause:unable to find valid certification path to requested target的错误
image.png

解决方法:在gradle文件中添加代理。
image.png

maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/google' }
maven { url 'http://maven.aliyun.com/nexus/content/repositories/gradle-plugin' }

添加完代理文件以后记得点右上角的同步按钮。
image.png

如果点击同步以后仍然出现上述插件不能下载成功的现象,点击Android Studio中菜单栏的更新按钮,多次尝试点击更新按钮即可。

image.png

发布了5 篇原创文章 · 获赞 14 · 访问量 435

猜你喜欢

转载自blog.csdn.net/huweiliyi/article/details/105343679