Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing error "Flutter requires PowerShell 5.0 or newer." in IDE #1892

Closed
pitoszud opened this issue Jul 24, 2019 · 10 comments
Closed

Missing error "Flutter requires PowerShell 5.0 or newer." in IDE #1892

pitoszud opened this issue Jul 24, 2019 · 10 comments
Labels
in flutter Relates to running Flutter apps is bug on windows
Milestone

Comments

@pitoszud
Copy link

The error below is printed in the flutter console (flutter\flutter_console.bat) but VS code and Android studio console (flutter\bin\flutter.bat) do nothing (just waiting for resources), so users who have Powershell below 5.0 don't know that they need to upgrade. This is likely to affect those on Windows 7

It happens after running one of the following commands:

flutter upgrade
flutter update
flutter doctor

Environment variables are set up as follows:

C:\Windows\System32;
E:\flutter\flutter\bin;
E:\git\Git\bin;

Checking Dart SDK version...
The term 'Unblock-File' is not recognized as the name of a cmdlet, function, sc
ript file, or operable program. Check the spelling of the name, or if a path wa
s included, verify that the path is correct and try again.
At line:1 char:13

  • Unblock-File <<<< -Path 'E:\flutter\flutter/bin/internal/update_dart_sdk.ps1
    '; & 'E:\flutter\flutter/bin/internal/update_dart_sdk.ps1'
    • CategoryInfo : ObjectNotFound: (Unblock-File:String) [], Comman
      dNotFoundException
    • FullyQualifiedErrorId : CommandNotFoundException

Flutter requires PowerShell 5.0 or newer.

@DanTup DanTup added in flutter Relates to running Flutter apps is bug labels Jul 24, 2019
@DanTup DanTup added this to the v3.4.0 milestone Jul 24, 2019
@DanTup DanTup modified the milestones: v3.4.0, v3.3.0 Jul 25, 2019
@DanTup DanTup closed this as completed in 2fe3d02 Jul 25, 2019
@DanTup
Copy link
Member

DanTup commented Jul 25, 2019

Thanks! This is because we don't route all of the output to the console during the setup (because we replace it with a progress indicator). I've changed to now show an error message when this occurs.

PowerShell

@pitoszud
Copy link
Author

Thanks Danny,

"...PowerShell 8.0..." - typo? Just to confirm, I've updated PS to 5.1 and all is working fine now.

@DanTup
Copy link
Member

DanTup commented Jul 25, 2019

Heh, the real message from Flutter will be passed through to the UI. I just changed Flutter to temporarily need "PowerShell 8" so that I could test it (since I already had >= 5) 😄

@iamkarloramirez
Copy link

how to update powershell?

@DanTup
Copy link
Member

DanTup commented Jan 8, 2020

@iamkarloramirez it's installed with the Windows Management Framework:

https://www.microsoft.com/en-us/download/details.aspx?id=54616

@Emred360
Copy link

Emred360 commented Oct 1, 2020

Thanks Danny,

"...PowerShell 8.0..." - typo? Just to confirm, I've updated PS to 5.1 and all is working fine now.

Please How did you update your PowerShell?

@DanTup
Copy link
Member

DanTup commented Oct 1, 2020

@Emred360 there's a link in the comment above - it's part of the Windows Management Framework.

@anproghub
Copy link

set

@Emred360
Copy link

@DanTup Thanks for your reply. I have updated my PowerShell.

But I have a new issue which I've been battling with for a long time now.

image

@DanTup
Copy link
Member

DanTup commented Oct 13, 2020

@Emred360 that seems like a Gradle issue rather than the VS Code plugin so it's not something I'm familiar with. However if the error is to believed, it seems like it's trying to allocate 1.5GB for the heap (possible because Java was launched with Xxm1536?) but is unable to (this may be because you don't have enough RAM).

You may wish to try some of the suggestions on StackOverflow:

https://stackoverflow.com/questions/30045417/android-gradle-could-not-reserve-enough-space-for-object-heap/31760855#31760855

https://stackoverflow.com/questions/30045417/android-gradle-could-not-reserve-enough-space-for-object-heap/41426252#41426252

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps is bug on windows
Projects
None yet
Development

No branches or pull requests

5 participants