1

I'm getting this error while building the apk: .gradle\4.6\fileHashes\fileHashes.lock (Access is denied) I had tried all the possibilities mentioned in Gradle sync failed access is denied in android studio

Apart from deleting .gradle folder, I had also tried to move .gradle folder to another drive but didn't resolved my error. I had also uninstalled and again installed Android Studio but no more modifications.

Prudhvi
  • 31
  • 1
  • 7

2 Answers2

4

For my case, I solved this problem by giving permissions to the project folder and its subfolders.

sudo chmod -R 777 ProjectFolder
  • This does not really answer the question. If you have a different question, you can ask it by clicking [Ask Question](https://stackoverflow.com/questions/ask). To get notified when this question gets new answers, you can [follow this question](https://meta.stackexchange.com/q/345661). Once you have enough [reputation](https://stackoverflow.com/help/whats-reputation), you can also [add a bounty](https://stackoverflow.com/help/privileges/set-bounties) to draw more attention to this question. - [From Review](/review/late-answers/30025627) – Jebasuthan Oct 08 '21 at 11:33
0

I faced this same issue. changing permissions on gradle folder worked out for me. chmod 755 gradle

dreambigcoder
  • 1,859
  • 4
  • 22
  • 32