3

I'm new to flutter. I installed VS, dart and flutter inside. Right now I'm following tutorials and learning stuff. Everything was okey, I was working from dart terminal. After I changed channel to "dev" (flutter channel dev) and tried to run app, flutter commands takes forever now, I mean when i press enter in terminal, it receives my command but does nothing, just blinking cursor. Only way out is "ctrl+c", to stop the process. So, I even cannot changes channel back. Even when i Type command "flutter channels", it hangs... I'm working on windows

I tried restarting VS, PC, reinstalling dart and flutter. non of them works for me.

enter image description here

4
  • Run any command with the -v option so Flutter prints logging information. Commented Dec 27, 2018 at 10:39
  • I tried that too, but terminal just takes command and then nothing happens :) even with -v Commented Dec 27, 2018 at 10:40
  • make sure to add flutter to your PATH Commented Dec 27, 2018 at 15:20
  • Delete cache file in flutter/bin/ And run any flutter command in terminal or cmd. This will reconfigures dart. It worked for me ✅. Commented Jun 10 at 6:41

6 Answers 6

7

I also have the same problem. The reason for this problem is version conflict between dart sdk and flutter sdk. Try the below options,

Option 1:

  • Close your ide,restart the terminal
  • Remove the cache folder from \flutter_sdk\flutter\bin and run flutter doctor command in terminal. This will try to re-download dart sdk.

Option 2: - Try to upgrade the flutter sdk version. updating via command line is not possible. So download the updated flutter sdk and replace it in current file location.

Sign up to request clarification or add additional context in comments.

1 Comment

removing the cache folder worked perfectly. Thank you
2

I got the same issue, just misread the docs. The mistake I was making was that it says-
Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK (for example, C:\src\flutter; do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges).
which I read as install in C:\Program Files.

Thus extracting the zip file in some accessible location like the one specified should work.

Comments

1

In flutter sdk directory delete the cache folder it works

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.
0

Check folder and directory ownership and rights on fluter sdk directory.

Comments

0

I found out that for some reason git (through VS Code) was locking %FLUTTER_DIR%/bin/cache/flutter.bat.lock.

It's easy to diagnose this by adding an ECHO "trying to acquire lock" right before the CALL line after the :acquire_lock line (currently line 44) into the bin/internal/shared.bat file.

Comments

-1

Place the flutter directory outside the C:\Program Files worked for me.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.