【发布时间】:2021-03-20 12:56:51
【问题描述】:
我尝试运行 Flutter 项目但出现错误
Flutter failed to write to a file at
"C:\Users\Dell\flutter-development\projects\flutter_complete_guide\ios\Runner\GeneratedPluginRegistrant.h". The flutter
tool cannot access the file.
Please ensure that the SDK and/or project is installed in a location that has read/write permissions for the current
user.
版本:
颤振 1.22.4,
Windows 10
我尝试用 cmd 和 android-studio 创建一个 Flutter 项目,但结果是一样的。
我也为所有(包括戴尔用户)的flutter-sdk目录、flutter项目及其子目录授予了完全权限。
曾经尝试使用 flutter create myapp 从头开始构建项目 获取下一个错误
PS C:\src1\project> flutter create myapp
Recreating project myapp...
myapp\android\app\src\main\res\mipmap-mdpi\ic_launcher.png (created)
Failed to send crash report due to a network error: SocketException: OS Error: Access is denied.
, errno = 5, address = clients2.google.com, port = 63568
Oops; flutter has exited unexpectedly: "FileSystemException: Cannot copy file to 'C:\src1\project\myapp\android\app\src\main\res\mipmap-mdpi\ic_launcher.png', path =
'C:\src1\flutter\packages\flutter_tools\templates\app\android.tmpl\app\src\main\res\mipmap-mdpi\ic_launcher.png' (OS Error: Access is denied.
, errno = 5)".
【问题讨论】:
标签: android android-studio flutter permissions windows-10