Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user [duplicate]

Thanks you for your time. I really try to complete de configuration of my flutter app for upload to the playstore , but i have this problem when i try execute "flutter clean" like a step in the guide (https://docs.flutter.dev/deployment/android#create-an-upload-keystore):

"Flutter failed to delete a directory at "build". The flutter tool cannot access the file or directory."

"Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current user."

I have tried deleting android studio folders and I have not been successful.

I have tried : Windows Security ->Virus & threat protection ->Manage settings ->Controlled folder access ->Turn off Controlled folder access

Bye :D

like image 815
DARKATOV Avatar asked Sep 13 '25 08:09

DARKATOV


2 Answers

My problem was importing a project from Windows. I compared the imported folder with one that was created on MacOS and the difference was that appeared extended attribute. So my solution was to remove the extended attributes via command line:

$ sudo xattr -c -r  <project_folder> 
like image 174
Akam Barznji Avatar answered Sep 15 '25 21:09

Akam Barznji


Issue: Resolving Extended Attributes Discrepancy when Importing a Project from Windows to MacOS

Upon importing a project from Windows to MacOS, I encountered a discrepancy between the imported folder and one created natively on MacOS. The key disparity was the presence of extended attributes in the imported project.

To address this, I employed a command-line solution to remove extended attributes recursively from the project folder. The following command was executed with elevated privileges:

$ sudo xattr -c -r <project_folder>

This command utilizes the xattr tool to clear (-c) extended attributes recursively (-r) within the specified <project_folder>. By doing so, the project's attributes are aligned with those of a typical MacOS-created project.

This resolution ensures consistency in the project's attributes, mitigating potential issues arising from disparities introduced during the import process.

like image 28
Apurv Jha Avatar answered Sep 15 '25 23:09

Apurv Jha