首页 > 解决方案 > Flutter 无法写入位于“C:\Users\XXXX\Desktop\AppFolder\FApp\.flutter-plugins”的文件。flutter工具无法访问文件

问题描述

我在尝试构建 Flutter 项目时遇到了这个错误。

我从终端和 android studio 都尝试了颤振命令。

Flutter failed to write to a file at "C:\Users\XXXX\Desktop\AppFolder\Flutter-App-v2.0\.flutter-plugins". 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.

标签: flutterandroid-studioflutter-dependencies

解决方案


错误是我从 Windows 安全设置中限制了对该文件夹的访问。

Restricted Access我的勒索软件保护文件下有该文件夹。

检查转到Windows Security-> Virus & Threat Protection-> Ransomware protection-> Protected Folder。并删除文件。

如果这不能解决您的问题,请尝试在任何其他文件夹中创建一个颤振项目。或者有些东西不允许 Flutter SDK 对该文件夹进行更改。它也可以是你的antivirus software


推荐阅读