如何在windows中安装dart

在windows中安装dart,使用Chocolatey命令行进行安装,

直接使用cmd打开命令行执行choco install dart-sdk报错:

'choco' 不是内部或外部命令,也不是可运行的程序
或批处理文件。

原因是在windows环境中还没有安装Chocolatey

安装Chocolatey必须使用windows 的powershell.exe进行安装,windows打开powershell.exe的方法数 Win+x

打开powershell后执行以下,命令即可:

Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))

现在就可以按以下步骤安装dart了:

猜你喜欢

转载自www.cnblogs.com/zhang-jiao/p/12482570.html