错误信息:
> Could not resolve com.android.tools.build:gradle:4.0.1.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:4.0.1.
> Could not get resource 'https://maven.aliyun.com/repository/public/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> Could not GET 'https://maven.aliyun.com/repository/public/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
> Could not resolve com.android.tools.build:gradle:4.0.1.
> Could not get resource 'https://maven.aliyun.com/repository/google/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> Could not GET 'https://maven.aliyun.com/repository/google/com/android/tools/build/gradle/4.0.1/gradle-4.0.1.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
解决办法
尝试了各种办法,后来把我电脑的代理Charls关了,可以了!!!,说到底还是代理引起的
如果关了之后还没有起效,可以尝试把AndroidStudio重启一下,如果还有其他代理软件,也可以尝试关一下试试
网友评论