I just started using Android Studio 1.3 sdk 24 and it has worked fine until today. I get this error message about cache.properties and I delete that cache file but now I am
The quickest and more accurate approach to this problem is to remove from your project's
.gradle/<version>/buildOutputCleanup
folder the file cache.properties.lock
This will do the trick. After that, just rebuild or sync your project.
Go to the folder indicated in the error message. Delete the cache.properties.lock file.
I download gradle and changed path of gradle from C drive to D drive and fixed it
To fix the problem:
cache.properties (The system cannot find the file specified)
go to :
C:\Users\[User]\.gradle\caches\
Delete folders \2.4
and \2.8
Restart Android Studio
!.
You don't have to reinstall Android Studio or no need to delete all .gradle folder.
I am reinstalled the latest version of Android Studio and still I faced that problem. It caused my to rename the "Android Projects" folder on my desktop in my case.
The only thing that you have to do:
1-Navigate to C:\Users\user_name.gradle\caches\2.4 or (2.8 if error in it otherwise)
2-Copy the folder "2.4" or "2.8" and paste it somewhere safe just in case anything went wrong you will place it back
3-Delete this error folder from the directory C:\Users\user.gradle\caches\2.4\ (or \2.8)
4-Close the Android studio & restart it.
During restart it sync your project & Android Studio will generate new cache files.
It worked for me I hope it will work for you... :)
I found the solution to my question, but I do not know whether it is the optimal solution:
I deleted all .gradle
folders in user library and reinstalled android and then it worked.