I have an old project that am working at, I noticed that the .gradle folder has too many subfolders for each distribution of gradle I've changed in the past, is it safe to delete the old versions subfolders?
-
1If you try it, then the worst that can happen is you recreate the project :)– OneCricketeerMar 3, 2016 at 7:11
-
yes,thats just a gradle config file.the .folder will be recreated when you re-import the project– DroidekasMar 3, 2016 at 7:17
2 Answers
Inside the project you can find the .gradle
folder.
Inside you can find all settings and other files used by gradle to build the project. You can delete these files without problems. Gradle will recreate it.
Also these file are not committed and Version Control Systems. It means that when you checkout the project these files are not present on the project.
-
2Hi! After reading this. I deleted the .gradle folder and recreated it., but now my project broke entirely. Padding, font sizes have increased, and many other validation issues are happening which were not occurring before. Nothing is working as before. Can you please tell what can I do now? Nov 21, 2017 at 19:27
Though its very old thread but recently I run into the issue when renamed my android application root name manually. Access Denied error
coming on reopening in Android Studio for filehashes.lock under .gradle folder.
So followed below steps and it worked fine.
- Close Android Studio
- Delete .gradle folder manually
- Restart Android Studio
On restarting android studio, .gradle
folder will be recreated.