Launching lib/main.dart on sdk gphone64 arm64 in debug mode…
main.dart:1
Exception: 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.
Exited
but when with other flutter projects it can be built but this project can’t
2
Answers
I have faced the same issue. There is some extended attribute issue.
Use this command
Read the man page of xattr for more information.
Faced the same problem on mac m1 macos Ventura.
Solution:
Go to the directory: /Users/{username}/Library/Group Containers/group.com.apple.notes/Accounts/E525FE04-C02F-4E84-9EB7-F2F8CF38E443(ID may be different)/Media, find the directory with Android Studio files, delete everything, restart Android Studio and configure. After that the flutter doctor/run/build command does not give an error message:
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.