Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Could not add entry to cache fileSnapshots.bin

I copied my project folder for wiping my hard drive and now, trying to import in Android Studio I get this error on buildgradle

Error:Could not add entry '2095793483774087535' to cache fileSnapshots.bin (/home/ivan/Forotek/.gradle/1.10/taskArtifacts/fileSnapshots.bin). 

Corrupted IndexBlock 6198 found in cache '/home/ivan/Forotek/.gradle/1.10/taskArtifacts/fileSnapshots.bin'.

I tried importing in Windows, Mac & Linux, I get the same error always

like image 778
user3579107 Avatar asked May 21 '14 17:05

user3579107


2 Answers

I just had this happen to me. Deleted the ".gradle" directory and then did a "Sync Project with Gradle Files". Once I did that, I was able to successfully build the project again.

like image 175
Jesse Avatar answered Sep 24 '22 19:09

Jesse


open terminal in android studio and type this command and rebuild your project it will 100% work

Note: -this command will only work with mac or linux machines

rm -R .gradle 

In case of windows you can find similar command to delete the directory forcefully and it works

like image 44
Anirudh R Huilgol Avatar answered Sep 25 '22 19:09

Anirudh R Huilgol