I tried installing flutter by following the steps at https://flutter.dev/docs/get-started/install , but kept running into the following error when inputting flutter in to Command Prompt:
Unhandled exception: FileSystemException: Cannot open file, path = 'C:\Users\matt\AppData\Roaming.flutter_tool_state' (OS Error: Access is denied. , 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 (package:file/src/forwarding/forwarding_file.dart:154:16) #5 ErrorHandlingFile.writeAsStringSync. (package: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 (package:flutter_tools/src/base/error_handling_file_system.dart:136:5) #8 Config._flushValues (package:flutter_tools/src/base/config.dart:86:11) #9 Config.setValue (package:flutter_tools/src/base/config.dart:75:5) #10 _DefaultPersistentToolState.isRunningOnBot= (package:flutter_tools/src/persistent_tool_state.dart:120:45) #11 BotDetector.isRunningOnBot (package:flutter_tools/src/base/bot_detector.dart:46:33) #12 isRunningOnBot (package:flutter_tools/src/globals.dart:98:48) #13 runInContext.runnerWrapper (package:flutter_tools/src/context_runner.dart:63:34) #14 AppContext.run. (package: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 (package:flutter_tools/src/base/context.dart:149:18) #20 runInContext (package:flutter_tools/src/context_runner.dart:67:24) #21 run (package:flutter_tools/runner.dart:48:10) #22 main (package:flutter_tools/executable.dart:69:9) #23 main (file:///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)
Any help would be appreciated!
2条答案
按热度按时间w6lpcovy1#
(OS错误:访问被拒绝。错误号= 5)
错误5:拒绝访问是Windows 10上的已知问题。此错误阻止您在计算机上安装软件以及访问或修改某些文件。
此问题的原因是权限不可用。如果您没有管理员权限或您的帐户不是管理员帐户,Windows 10将阻止您安装。
How to Fix Error 5 Access Denied?
iugsix8n2#
它对我的工作禁用“控制文件夹访问”选项在Windows Defender