admin管理员组

文章数量:1130349

问题:“无法将“Unblock-File”项识别为 cmdlet、函数、脚本文件或可运行程序的名称”

我打开power shell运行‘flutter doctor’时,遇到以下问题:

Checking Dart SDK version...
	无法将“Unblock-File”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后重试。
	所在位置 行:1 字符: 13+ Unblock-File <<<<  -Path 'D:\FFlutter\flutter/bin/internal/update_dart_sdk.ps1'; & 'D:\FFlutter\flutter/bin/internal/update_dart_sdk.ps1'
    	+ CategoryInfo          : ObjectNotFound:
    	+ (Unblock-	File:String) [], Comman
   		dNotFoundException
    	+ FullyQualifiedErrorId : CommandNotFoundException
	Flutter requires PowerShell 5.0 or newer.
	See https://flutter.io/docs/get-started/install/windows for more.
	Building flutter tool...

原因:Windows 7环境,需要先把PowerShell升级到5,默认自带的是PowerShell 2

解决:安装ps5.0

1、下载安装包网址

问题:“无法将“Unblock-File”项识别为 cmdlet、函数、脚本文件或可运行程序的名称”

我打开power shell运行‘flutter doctor’时,遇到以下问题:

Checking Dart SDK version...
	无法将“Unblock-File”项识别为 cmdlet、函数、脚本文件或可运行程序的名称。请检查名称的拼写,如果包括路径,请确保路径正确,然后重试。
	所在位置 行:1 字符: 13+ Unblock-File <<<<  -Path 'D:\FFlutter\flutter/bin/internal/update_dart_sdk.ps1'; & 'D:\FFlutter\flutter/bin/internal/update_dart_sdk.ps1'
    	+ CategoryInfo          : ObjectNotFound:
    	+ (Unblock-	File:String) [], Comman
   		dNotFoundException
    	+ FullyQualifiedErrorId : CommandNotFoundException
	Flutter requires PowerShell 5.0 or newer.
	See https://flutter.io/docs/get-started/install/windows for more.
	Building flutter tool...

原因:Windows 7环境,需要先把PowerShell升级到5,默认自带的是PowerShell 2

解决:安装ps5.0

1、下载安装包网址

本文标签: 环境Flutter