Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gradle task ":app:dexBuilderDebug" fails with AccessDeniedException (Android Studio can't delete directories)

I'm using Android Studio Arctic Fox (2020.3.1 Patch 3 | Build #AI-203.7717.56.2031.7784292, built on October 1, 2021). When I try to build my project, gradle task ":app:dexBuilderDebug" fails throwing AccessDeniedException. For a short time, the problem is solved only by manually deleting these directories. So how can I make Android Studio be able to delete these directories automatically again? (running as administrator didn't help). Thanks

Full exception message:

Execution failed for task ':app:dexBuilderDebug'.
> java.nio.file.AccessDeniedException: C:\Users\Roman\AndroidDevelopment\AndroidProjects\Project\app\build\intermediates\desugar_graph\debug\out\currentProject\dirs_bucket_0
like image 809
Roman Popov Avatar asked Dec 08 '25 18:12

Roman Popov


1 Answers

The problem was that the project folder was syncing with Google Drive. One had only to remove it from the synchronized ones, and everything worked out right away. My advice is to use VCS, their functionality will certainly be enough

like image 98
Roman Popov Avatar answered Dec 11 '25 11:12

Roman Popov