Android Studio 中的 Gradle 构建失败(无法从缓存中读取 testArtifacts.bin) [英] Gradle Build Failed in Android Studio (Cannot read testArtifacts.bin from cache)

查看:22
本文介绍了Android Studio 中的 Gradle 构建失败(无法从缓存中读取 testArtifacts.bin)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

代码没有错误.但是构建失败并出现以下错误:

There is no error in the code. But the build fails with the following error:

Error:Could not read entry ':app:packageDebug' from cache taskArtifacts.bin (/Users/sibidharan/Developer/Android Dev/Karpagam/.gradle/2.10/taskArtifacts/taskArtifacts.bin).
> java.io.EOFException (no error message)

我在 OS X 10.11.3 上使用 Android Studio 2.0 Preview 9

I am using Android Studio 2.0 Preview 9 on OS X 10.11.3

推荐答案

删除项目本地 .gradle 文件夹为我做到了.然后在下一次构建期间重新创建,一切又恢复正常.

Removing the project-local .gradle folder did it for me. It was then recreated during the next build and all was fine again.

更新:

这个答案有帮助.

Gradle 缓存位于

  • 在 Windows 上:%USER_HOME%.gradle/caches
  • 在 Mac/Unix 上:$HOME/.gradle/caches/

您可以浏览到这些目录并手动删除它或运行

You can browse to these directory and manually delete it or run

rm -rf $HOME/.gradle/caches/

在 Unix 或 OS X 系统上.

on Unix or OS X system.

这篇关于Android Studio 中的 Gradle 构建失败(无法从缓存中读取 testArtifacts.bin)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆