Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter doctor hangs on start, no output

Tags:

flutter

I'm trying to install Flutter on my Windows 8 computer. I unzipped files to C:/flutter and added the bin folder to the path variable. However I am stuck on the step where I have to run flutter doctor in flutter_console. The Flutter doctor hangs and only shows the blinking cursor and no output. More interestingly any other flutter command will freeze the exact same way.

screenshots

I have already tried

  1. Running flutter console as admin

  2. Reinstalling flutter

  3. Installing the dev version

  4. Use the VS code plugin to run flutter doctor

But they all led to the same result

like image 907
Neepsy Avatar asked Jan 15 '19 01:01

Neepsy


People also ask

Why is flutter doctor running in a loop after installation?

If you delete cache folder under bin to solve some installation issues, this cause a endless loop in flutter doctor. This was my case. Show activity on this post. I had the same issue when my flutter directory wasn't located directly in my C:/ drive ("C:/flutter") Show activity on this post.

Why can’t I access the flutter Doctor Command in command prompt?

Many web developers find it difficult to access the Flutter doctor command in Command Prompt. Sometimes these involve spits error stating VersionCheckError: Command exited with code 128. Flutter offers a new tool called a Flutter Doctor.

How to check if Dart SDK is working with flutter?

Run your application with flutter run and attach all the log output. Run flutter analyze and attach any output of that command also. Paste the output of running flutter doctor here. Checking Dart SDK version...

Why does flutter Doctor spits out error?

Flutter doctor spits out error could be caused by the incomplete or corrupted download. Some kind of error, such as a tree is behind HEAD, involves doing- git pull How To Fix Git Error “Fatal: Bad Object Head”? When you are running the error in GIT, it could prevent you from completing the operation.


2 Answers

So the solution of this issue is:

  1. delete folder in your flutter SDK path flutter/bin/cache (detail info here)
  2. run flutter doctor -v again will trigger downloading Dart SDK

PS: if your network is slow because of in china, check bellow:

Do things bellow in terminal maybe speed up your the download speed (for me it's speed up 3x) for changing channel:

  1. export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn (detail info here)
  2. flutter channel stable (one example of change flutter channel)
  3. flutter doctor -v (trigger downloading SDK)
like image 100
JerryZhou Avatar answered Sep 19 '22 18:09

JerryZhou


Albeith in win10, these steps solved the issue for me (do not know if all are necessary)

  1. restart win
  2. run cmd as administrator
  3. flutter doctor

According to this git issue, this is mostly caused by installing flutter in a directory for which you do not own the priviledges. For example, the Program Files folder: to solve then, you can try to move the installation folder

like image 40
SimoneMSR Avatar answered Sep 23 '22 18:09

SimoneMSR