Could not resolve all files for configuration ':classpath'.问题解决
今天,使用Android Studio 3.0.1 打开下载的工程项目,build project时结果报错,如下:
Error:A problem occurred configuring root project 'apptest'.
> Could not resolve all files for configuration ':classpath'.
> Could not resolve com.android.tools.build:gradle:3.0.0.
Required by:
project :
> Could not resolve com.android.tools.build:gradle:3.0.0.
> Could not get resource 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> Could not GET 'https://dl.google.com/dl/android/maven2/com/android/tools/build/gradle/3.0.0/gradle-3.0.0.pom'.
> sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException:unable to find valid certification path to requested target
解决办法为将com.android.tools.build:gradle的版本号和Android studio的版本号一致。