更新到Android Studio 2.3之后,构建gradle无法构建

Abd*_*leh 5 android

错误:无法打开zip文件.

Gradle的依赖性缓存可能已损坏(这有时会在网络连接超时后发生.)

<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
<a href="syncProject">Re-download dependencies and sync project (requires network)</a>
Run Code Online (Sandbox Code Playgroud)

这发生在昨天.我无法运行任何旧项目,虽然我有良好的互联网连接,但我无法下载此依赖项.

Dee*_*mar 0

解决此问题的步骤:

1)用以下代码替换build.gradle(项目)中的依赖项:

类路径'com.android.tools.build:gradle:2.3.0'

2)用以下代码替换Gradle-wrapper.properties中的distributionUrl:

distributionUrl=https://services.gradle.org/distributions/gradle-3.3-all.zip

3)不要忘记在项目级别设置中使用Gradle默认包装器。