While working with Flutter, your VS Code may have shown you this error. It can be annoying at times, especially when you are a beginner. The reason for this “Waiting For Another Flutter Command To Release The Startup Lock” error is due to the malfunctioning of pubspec.yaml file, which may have resulted from multiple dart pub get commands.
Read on to learn how you can resolve this issue in a few quick steps.
Here are the possible solutions that you can try to fix the error “waiting for another flutter command to release the startup lock”.
1. Kill All Dart Instances
The easy way to solve this issue is by ending all the instances in the Dart. All you need is to open the terminal and enter these commands:
killall -9 dart
This command is for Linux. If you are using Windows, enter this command then:
taskkill /F /IM dart.exe
If this doesn’t work, move on to the next step.
2. Release the Occupied Lock
Before removing the lockfile, you must shut down the Android Studio. The file is located within the Flutter Installation directory. You can release the occupied lockfile through this command in the terminal:
<YOUR FLUTTER FOLDER>/bin/cache/lockfile
The process will be different for Windows. Read on to the next section if your operating system is using Windows.
3. Removing Lockfile in Windows
The process to remove lockfile is different for Windows. Here is how you can do it:
- Open the task manager by pressing Ctrl + Alt + Delete
- Look for “dart” in the processes and End that task
- Restart the editor after closing it.
- After the editor is done with the initial processing, you can enter any command to check whether it is functioning properly or still showing the error.
If that doesn’t work, you can shut down your PC and switch it on, but don’t use the restart function. In case nothing works, you do other things that are discussed in the following sections.
4. Clean the Cache of the Flutter Project
For quick Cache clean-up:
- Go to Android Studio tools > Flutter>Clean.
- You can also go to File> Invalidate Cache and Restart.
- Or just run the terminal and enter “Flutter Clean.”
The last resort is to get rid of Flutter.
Related Post – Disable Back Button flutter
5. Uninstall Flutter
To uninstall Flutter, follow these simple steps:
- Go to the File in your Android Studio.
- Then tap on Settings and go to Plugin
- There, you can uninstall Flutter and Dart plugins from the Studio.
- Further, you should also uninstall Flutter and Dart from the Installed tab.
- Finally, restart your IDE.
This article gave you the solution to resolving the “Waiting For Another Flutter Command To Release The Startup Lock” error. We hope that it helps. We continue to bring such problem-solving guides for you all. Stay in touch with us so you don’t miss out on any future blog releases.
To hire a flutter developer, you can count on us for any of your flutter app development needs. Our professional and highly skilled Flutter developers will help you get your dream app in no time. Have a glimpse of our app development portfolio to have a better demonstration of what we have built so far.