相关疑难解决方法(0)

如何在将android studio从2.2.3更新到2.3后修复"Gradle的依赖缓存可能已损坏"错误?

在此输入图像描述

> Error:Failed to open zip file. Gradle's dependency cache may be
> corrupt (this sometimes occurs after a network connection timeout.) <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)

android

14
推荐指数
3
解决办法
4万
查看次数

更新到Android Studio 2.3后出现Gradle错误

gradle构建失败并显示消息

 Error:Could not create parent directory for lock file C:\Program Files\Android\Android Studio\gradle\gradle-2.14.1\wrapper\dists\gradle-2.14.1-all\8bnwg5hd3w55iofp58khbp6yv\gradle-2.14.1-all.zip.lck
Run Code Online (Sandbox Code Playgroud)

这是我的build.gradle(项目)

 // Top-level build file where you can add configuration options common to all sub-projects/modules.

 buildscript {
   repositories {
    jcenter()
}
    dependencies {
    classpath 'com.android.tools.build:gradle:2.2.3'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
    }
 }

allprojects {
  repositories {
    jcenter()
  }
}

  task clean(type: Delete) {
    delete rootProject.buildDir
}
Run Code Online (Sandbox Code Playgroud)

更新后,所有项目都显示相同的错误.

android android-studio android-studio-2.3

10
推荐指数
2
解决办法
5万
查看次数