flutter doctor FileSystemException:无法打开文件,路径='C:\ Program Files \ flutter \ version'(操作系统错误:权限被拒绝,errno = 5)

时间:2019-07-11 18:43:09

标签: flutter

因此,我最近切换为抖动,并在PC(Windows 10)和笔记本电脑(Ubuntu 18.04)上进行了设置。 我仅在Windows 10上有问题。 一切正常,然后我从假期回来,尝试在Win 10上运行我的项目,但没有成功。 然后我尝试在命令窗口中运行“ flutter doctor”,甚至没有效果。 所以我的问题是:“为什么'颤抖医生'命令不起作用?”

下面是命令窗口和崩溃报告的图片。

命令窗口: C:\ Users \Jänner>颤抖的医生,糟糕;颤抖已意外退出。向Google发送崩溃报告。已发送崩溃报告(报告ID:7e4a9b2ece9168c9)崩溃报告已写入C:\ Users \Jänner\ flutter_03.log;请通过https://github.com/flutter/flutter/issues告诉我们。

扑灭崩溃报告文件: 扑灭报告请在https://github.com/flutter/flutter/issues提交。

命令

颤抖的医生

例外

FileSystemException:FileSystemException:无法打开文件,路径='C:\ Program Files \ flutter \ version'(操作系统错误:Zugriff verweigert ,errno = 5)

#0      _File.open.<anonymous closure> (dart:io/file_impl.dart:364:9)
#1      _rootRunUnary (dart:async/zone.dart:1132:38)
#2      _CustomZone.runUnary (dart:async/zone.dart:1029:19)
#3      _FutureListener.handleValue (dart:async/future_impl.dart:126:18)
#4      Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:639:45)
#5      Future._propagateToListeners (dart:async/future_impl.dart:668:32)
#6      Future._completeWithValue (dart:async/future_impl.dart:483:5)
#7      Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:513:7)
#8      _rootRun (dart:async/zone.dart:1124:13)
#9      _CustomZone.run (dart:async/zone.dart:1021:19)
#10     _CustomZone.bindCallback.<anonymous closure> (dart:async/zone.dart:947:23)
#11     _microtaskLoop (dart:async/schedule_microtask.dart:41:21)
#12     _startMicrotaskLoop (dart:async/schedule_microtask.dart:50:5)
#13     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:115:13)
#14     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:5)

颤抖的医生

[32m[✓][39m Flutter (Channel stable, v1.5.4-hotfix.2, on Microsoft Windows [Version 10.0.17763.615], locale de-DE)
    [32m•[39m Flutter version 1.5.4-hotfix.2 at C:\Program Files\flutter
    [32m•[39m Framework revision 7a4c33425d (2 months ago), 2019-04-29 11:05:24 -0700
    [32m•[39m Engine revision 52c7a1e849
    [32m•[39m Dart version 2.3.0 (build 2.3.0-dev.0.5 a1668566e5)

[33m[!][39m Android toolchain - develop for Android devices (Android SDK version 28.0.3)
    [32m•[39m Android SDK at Z:\Java\JavaSDK
    [32m•[39m Android NDK location not configured (optional; useful for native profiling support)
    [32m•[39m Platform android-28, build-tools 28.0.3
    [32m•[39m ANDROID_HOME = Z:\Java\JavaSDK
    [32m•[39m Java binary at: Z:\Android Studio\jre\bin\java
    [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)
    [31m✗[39m Android license status unknown.
      Try re-installing or updating your Android SDK Manager.
      See https://developer.android.com/studio/#downloads or visit https://flutter.dev/setup/#android-setup for detailed
      instructions.

[32m[✓][39m Android Studio (version 3.4)
    [32m•[39m Android Studio at Z:\Android Studio
    [32m•[39m Flutter plugin version 37.0.1
    [32m•[39m Dart plugin version 183.6270
    [32m•[39m Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1343-b01)

[33m[!][39m Connected device
    [33m![39m No devices available

[33m![39m Doctor found issues in 2 categories.

1 个答案:

答案 0 :(得分:0)

似乎在 Flutter 之类的目录中安装 C:\Program Files\ 并不理想,因为它需要提升权限,这会导致一些错误。

它在 documentation 中写为警告。

enter image description here

有关不同 Program Files 语言的参考,您可以查看 this

enter image description here