简体   繁体   English

无法在Flutter控制台中执行Flutter Doctor命令

[英]Can't execute flutter doctor command in flutter console

When I run flutter doctor command in flutter console I'm getting this error. 在flutter控制台中运行flutter doctor命令时,出现此错误。 Can someone please help me out. 有人可以帮我吗。 I tried running in C drive used both the combination of Run as Admin (C and D drive) 我尝试在C驱动器中运行,并同时以管理员身份运行(C和D驱动器)

D:\flutter>flutter doctor
CreateProcessW failed 193

CreateProcessW failed 193
Unhandled exception:
ProcessException: %1 is not a valid Win32 application.
    Command: C:\Program Files\Git\cmd\git.EXE rev-parse --abbrev-ref --symbolic @{u}
    #0      _ProcessImpl._runAndWait (dart:io-patch/process_patch.dart:485)
    #1      _runNonInteractiveProcessSync (dart:io-patch/process_patch.dart:631)
    #2      Process.runSync (dart:io-patch/process_patch.dart:66)
    #3      LocalProcessManager.runSync (package:process/src/interface/local_process_manager.dart:83)
    #4      _runWithLoggingSync (package:flutter_tools/src/base/process.dart:321)
    #5      runSync (package:flutter_tools/src/base/process.dart:296)
    #6      _runGit (package:flutter_tools/src/version.dart:449)
    #7      new FlutterVersion (package:flutter_tools/src/version.dart:23)
    #8      runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:64)
    #9      AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99)
    #10     _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/dart:collection/compact_hash.dart:277)
    #11     AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87)
    #12     AppContext.[] (package:flutter_tools/src/base/context.dart:114)
    #13     FlutterVersion.instance (package:flutter_tools/src/version.dart:170)
    #14     new Usage (package:flutter_tools/src/usage.dart:26)
    #15     runInContext.<anonymous closure> (package:flutter_tools/src/context_runner.dart:76)
    #16     AppContext._generateIfNecessary.<anonymous closure> (package:flutter_tools/src/base/context.dart:99)
    #17     _HashVMBase&MapMixin&&_LinkedHashMapMixin.putIfAbsent (dart:collection-patch/dart:collection/compact_hash.dart:277)
    #18     AppContext._generateIfNecessary (package:flutter_tools/src/base/context.dart:87)
    #19     AppContext.[] (package:flutter_tools/src/base/context.dart:114)
    #20     Usage.instance (package:flutter_tools/src/usage.dart:52)
    #21     flutterUsage (package:flutter_tools/src/usage.dart:20)
    #22     _handleToolError (package:flutter_tools/runner.dart:113)
    <asynchronous suspension>
    #23     run.<anonymous closure> (package:flutter_tools/runner.dart:63)
    <asynchronous suspension>
    #24     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:142)
    <asynchronous suspension>
    #25     _rootRun (dart:async/zone.dart:1126)
    #26     _CustomZone.run (dart:async/zone.dart:1023)
    #27     runZoned (dart:async/zone.dart:1501)
    #28     AppContext.run (package:flutter_tools/src/base/context.dart:141)
    <asynchronous suspension>
    #29     runInContext (package:flutter_tools/src/context_runner.dart:43)
    <asynchronous suspension>
    #30     run (package:flutter_tools/runner.dart:50)
    #31     main (package:flutter_tools/executable.dart:49)
    <asynchronous suspension>
    #32     main (file:///E:/b/build/slave/Windows_Flutter_Packaging/build/archive/flutter/packages/flutter_tools/bin/flutter_tools.dart:8)
    #33     _startIsolate.<anonymous closure> (dart:isolate-patch/dart:isolate/isolate_patch.dart:277)
    #34     _RawReceivePortImpl._handleMessage (dart:isolate-patch/dart:isolate/isolate_patch.dart:165) 

Try to reinstall git, after that update your path to be able to run flutter from your command prompt. 尝试重新安装git,然后更新路径,以便能够从命令提示符下运行flutter。

for more details on how to update your path visit: Update your path 有关如何更新路径的更多详细信息,请访问: 更新路径

尽管flutter现在支持空格,但可能会出现间距问题(例如C:\\ Users \\ M Junaid),但尝试将ANDROID SDK移到位置中没有空格(例如C:\\ Users \\ M.Junaid)的自定义位置路径并更新变量ANDROID_HOME (值应与您将其移动到的位置相同,没有空格)。

Go through this tutorial instead. 相反,请阅读本教程。 I know it's a pain to watch it entirely but on the other hand you will be able to run a fresh and clean project from scratch. 我知道完全看它很痛苦,但是另一方面,您将可以从头开始运行一个全新,干净的项目。

Flutter tutorial 颤振教程

After that I ended up buying the full course and let me tell you I have not being disappointed. 在那之后,我最终购买了完整的课程,然后告诉我,我并没有失望。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 为什么我不能在抖动上打印出图像? - Why can't I print out an image on flutter? Flutter 错误:无法无条件访问属性“docs”,因为接收者可以为“null” - Flutter error: The property 'docs' can't be unconditionally accessed because the receiver can be 'null' Flutter 错误 - 参数类型 'MaterialStateProperty<roundedrectangleborder> ' 不能分配给参数类型 'OutlinedBorder</roundedrectangleborder> - Flutter Error - The argument type 'MaterialStateProperty<RoundedRectangleBorder>' can't be assigned to the parameter type 'OutlinedBorder “关于 HttpException 捕获(错误)”在 flutter 中不起作用 - "on HttpException catch (error)" desn't work in flutter 无法执行我的查询 - Can't execute my query 如何处理 Firestore Flutter 中的异常? - how can I handle exception in firestore flutter? 我将我的whatsapp链接到我的flutter web并得到这个(参数类型'String'不能分配给参数类型'Uri'。) - I"m linking my whatsapp to my flutter web and getting this (The argument type 'String' can't be assigned to the parameter type 'Uri'.) 容器在 flutter - Container in flutter 试图处理 firebase 存储异常不起作用(颤振) - trying to handle firebase storage exception doesn't work (flutter) Flutter:关闭Internet连接后发生错误-“将io.flutter.console.FlutterConsoleFilter@70f92821应用于&#39;W / zzajf(5265)时出错” - Flutter: Error after turning off internet connection - “Error while applying io.flutter.console.FlutterConsoleFilter@70f92821 to 'W/zzajf ( 5265)”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM