Could not resolve all dependencies for configuration ':classpath'.

Error:Gradle: A problem occurred configuring root project 'MobileShopping'.
> Could not resolve all dependencies for configuration ':classpath'.
   > Could not resolve com.android.tools.build:gradle:1.0.0.
     Required by:
         :MobileShopping:unspecified
      > Could not GET 'https://jcenter.bintray.com/com/android/tools/build/gradle/1.0.0/gradle-1.0.0.pom'.

         > peer not authenticated



google了一堆答案都没用,最后原来是被墙的原因,解决如下


打开setting->gradle->Gradle VM Options:

-Dhttp.proxyHost=127.0.0.1 -Dhttp.proxyPort=8087

重启Android studio

另外在普通的java类里使用Android的库是不行的

你可能感兴趣的:(Could not resolve all dependencies for configuration ':classpath'.)