我尝试按照https://flutter.dev/docs/get-started/install上的步骤安装Flutter,但是在将Flutter输入到命令提示符中时始终遇到以下错误:
未处理的异常:FileSystemException:无法打开文件,路径= 'C:\ Users \ matt \ AppData \ Roaming.flutter_tool_state'(操作系统错误:访问权限 被拒绝。 ,errno = 5)#0 _File.throwIfError (dart:io / file_impl.dart:645:7)#1 _File.openSync (dart:io / file_impl.dart:489:5)#2 _File.writeAsBytesSync (dart:io / file_impl.dart:614:31)#3 _File.writeAsStringSync (dart:io / file_impl.dart:638:5)#4 ForwardingFile.writeAsStringSync (软件包:file / src / forwarding / forwarding_file.dart:154:16)#5 ErrorHandlingFile.writeAsStringSync。 (软件包:flutter_tools / src / base / error_handling_file_system.dart:137:22) #6 ErrorHandlingFile._runSync(package:flutter_tools / src / base / error_handling_file_system.dart:163:16) #7 ErrorHandlingFile.writeAsStringSync(软件包:flutter_tools / src / base / error_handling_file_system.dart:136:5) #8 Config._flushValues(软件包:flutter_tools / src / base / config.dart:86:11)#9 Config.setValue (软件包:flutter_tools / src / base / config.dart:75:5)#10 _DefaultPersistentToolState.isRunningOnBot =(软件包:flutter_tools / src / persistent_tool_state.dart:120:45)#11 BotDetector.isRunningOnBot (包:flutter_tools / src / base / bot_detector.dart:46:33)#12 isRunningOnBot (软件包:flutter_tools / src / globals.dart:98:48)#13 runInContext.runnerWrapper (软件包:flutter_tools / src / context_runner.dart:63:34)#14 AppContext.run。 (包:flutter_tools / src / base / context.dart:150:29)#15 _rootRun (dart:async / zone.dart:1184:13)#16 _CustomZone.run (dart:async / zone.dart:1077:19)#17 _runZoned (dart:async / zone.dart:1619:10)#18 runZoned (dart:async / zone.dart:1539:10)#19 AppContext.run (包:flutter_tools / src / base / context.dart:149:18)#20 runInContext (包:flutter_tools / src / context_runner.dart:67:24)#21运行 (package:flutter_tools / runner.dart:48:10)#22 main (package:flutter_tools / executable.dart:69:9)#23 main (文件:/// C:/b/s/w/ir/k/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8:3) #24 _startIsolate。 (dart:isolate-patch / isolate_patch.dart:299:32)#25 _RawReceivePortImpl._handleMessage(dart:isolate-patch / isolate_patch.dart:168:12)
任何帮助将不胜感激!
答案 0 :(得分:0)
(操作系统错误:访问被拒绝。,errno = 5)
错误5:Windows 10上的一个已知问题是拒绝访问。此错误使您无法在计算机上安装软件以及访问或修改某些文件。
此问题的原因是权限不可用。如果您没有管理员权限或您的帐户不是管理员帐户,Windows 10将阻止您安装。