flutter doctor在命令提示符或PowerShell窗口上均不起作用? [英] flutter doctor doesn't work on neither Command Prompt or PowerShell window?

查看:733
本文介绍了flutter doctor在命令提示符或PowerShell窗口上均不起作用?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

flutter doctor在命令提示符或PowerShell窗口上均不起作用? 我一直在尝试在Windows上安装Flutter.如本教程中所述,我已经克隆了Flutter SDK.我将git和flutter添加到了自己的路径中.但是,当我尝试运行flutter doctor时,命令提示符仍会显示以下内容:

flutter doctor doesn't work on neither Command Prompt or PowerShell window? I have been trying to install flutter on windows. I have cloned the Flutter SDK as mentioned in the tutorial. I have added git and the flutter to my path. But still when I try to run the flutter doctor the command prompt reply with this:

'where' is not recognized as an internal or external command operable program or batch file.
Error: Unable to find git in your path



检查cmd图像,您将确切地看到问题

check the cmd image you will see exactly the problem

推荐答案

要在Windows系统上的命令提示符下运行Flutter,它需要三件事

to run flutter from the command prompt on your windows system it requires three things

  1. 下载的flutter sdk的bin文件夹的路径 我已将sdk下载并保存在文档中,因此对我来说,路径为
  1. path to the bin folder of downloaded flutter sdk I have downloaded and saved the sdk in my documents so for me path will be

C:\Users\mahesh_2\Documents\flutter_windows_v0.11.9-beta\flutter\bin

  1. where.exe 位于C:\Windows\System32

注意:如果需要,您需要从此处下载 git 您在步骤3中找不到路径

Note:you need to download git from here if you dont find path in step 3

  1. git-cmd.exe 位于C:\Program Files\Git\git-cmd.exe

因此只需将这三个路径添加到您的环境变量中 转到系统环境变量 变量名称 Path

so to simply add these three paths to your environment variables go to system environment variables with variable name as Path

值为

C:\Windows\System32;C:\Program Files\Git\git-cmd.exe;C:\Users\mahesh_2\Documents\flutter_windows_v0.11.9-beta\flutter\bin

重新启动命令提示符,并尝试运行flutter和 Voila!,您应该会得到类似的东西

restart the command prompt and try running flutter and Voila! you should get something like this

这篇关于flutter doctor在命令提示符或PowerShell窗口上均不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆