Android Studio 升级 2.3 大版本后 gradle 版本为 classpath 'com.android.tools.build:gradle:2.3.0'

目前我使用的 leancloud 库如下

compile 'cn.leancloud.android:avoscloud-sdk:v3.14.5'
    compile 'cn.leancloud.android:avoscloud-statistics:v3.14.5'
    compile 'cn.leancloud.android:avoscloud-push:v3.14.5@aar'
    compile 'cn.leancloud.android:Java-WebSocket:1.3.2-leancloud'

执行 gradle clean build 报错如下:

* What went wrong:
A problem occurred configuring project ':app'.
> Could not resolve all dependencies for configuration ':app:_debugApkCopy'.
   > Could not resolve cn.leancloud.android:fastjson:1.1.39-leancloud.
     Required by:
         project :app > cn.leancloud.android:avoscloud-sdk:v3.14.5
      > Could not resolve cn.leancloud.android:fastjson:1.1.39-leancloud.
         > Failed to download SHA1 for resource 
     Required by:
         project :app > cn.leancloud.android:avoscloud-sdk:v3.14.5
      > Could not resolve cn.leancloud.android:okhttp:2.6.0-leancloud.
            > Could not resolve cn.leancloud.android:parent:2.6.0-leancloud.
               > Could not resolve cn.leancloud.android:parent:2.6.0-leancloud.
                  > Could not get resource 
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

是库的版本太低导致的吗?

你好,是你的 Gradle 版本升级后,需要更新相关配置。

在 Studio Terminal 里执行 gradle clean build 就好。