錯(cuò)誤信息:
> 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關(guān)了,可以了R衷隆J鬟础舆蝴!谦絮,說到底還是代理引起的
如果關(guān)了之后還沒有起效,可以嘗試把AndroidStudio重啟一下洁仗,如果還有其他代理軟件层皱,也可以嘗試關(guān)一下試試