Could not resolve all files for configuration ‘:classpath‘.

先放解决方法吧

1.打开项目根目录下的build.gradle
2.把jcenter()换成
maven{ url’http://maven.aliyun.com/nexus/content/groups/public/’ }
maven{ url’http://maven.aliyun.com/nexus/content/repositories/jcenter’}
就可以了(我文件中有2处,所以更改了两处)

报错日志如下

Error:A problem occurred configuring root project 'yyyy'.
> Could not resolve all files for configuration ':classpath'.
   > Could not download gradle-core.jar (com.android.tools.build:gradle-core:2.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle-core/2.2.3/gradle-core-2.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net: nodename nor servname provided, or not known
   > Could not download builder.jar (com.android.tools.build:builder:2.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/build/builder/2.2.3/builder-2.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/builder/2.2.3/builder-2.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net
   > Could not download lint.jar (com.android.tools.lint:lint:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.3/lint-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint/25.2.3/lint-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net
   > Could not download sdklib.jar (com.android.tools:sdklib:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdklib/25.2.3/sdklib-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdklib/25.2.3/sdklib-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net: nodename nor servname provided, or not known
   > Could not download sdk-common.jar (com.android.tools:sdk-common:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.3/sdk-common-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/sdk-common/25.2.3/sdk-common-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net
   > Could not download ddmlib.jar (com.android.tools.ddms:ddmlib:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.3/ddmlib-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/ddms/ddmlib/25.2.3/ddmlib-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net: nodename nor servname provided, or not known
   > Could not download protos.jar (com.android.tools.analytics-library:protos:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.3/protos-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/analytics-library/protos/25.2.3/protos-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net
   > Could not download lint-checks.jar (com.android.tools.lint:lint-checks:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.3/lint-checks-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-checks/25.2.3/lint-checks-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net
   > Could not download lint-api.jar (com.android.tools.lint:lint-api:25.2.3)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.3/lint-api-25.2.3.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/lint/lint-api/25.2.3/lint-api-25.2.3.jar'.
            > d29vzk4ow07wi7.cloudfront.net: nodename nor servname provided, or not known
   > Could not download uast.jar (com.android.tools.external.com-intellij:uast:145.597.4)
      > Could not get resource 'https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar'.
         > Could not GET 'https://jcenter.bintray.com/com/android/tools/external/com-intellij/uast/145.597.4/uast-145.597.4.jar'.
            > d29vzk4ow07wi7.cloudfront.net

你可能感兴趣的:(Android)