Flutter setup on Windows 11 using VS Code + Android Emulator
For Windows 11 + VS Code + Android Emulator, I recommend using VS Code as your coding/debugging IDE and installing Android Studio primarily for the Android SDK, SDK tools, and emulator. Flutter's current documentation recommends VS Code as a supported installation path, while Android Studio provides the Android tooling required for an emulator.
1. What you need
Install these components:
- Git for Windows
- Visual Studio Code
- Flutter SDK
- VS Code Flutter extension
- Android Studio
- Android SDK
- Android Emulator / virtual device
You do not have to write your application in Android Studio.
2. Install Git
Flutter's Windows setup lists Git for Windows as a prerequisite.
Install Git, then open PowerShell and verify:
You should see something similar to:
3. Install VS Code
Install Visual Studio Code, which will be your main development environment.
Then open:
VS Code → Extensions
Search for:
Install the official Flutter extension. Dart support is also installed/configured as part of the Flutter development setup.
The Flutter documentation currently recommends VS Code as one of the easiest ways to set up the Flutter SDK.
4. Install Flutter SDK
There are two approaches.
Recommended: let VS Code install it
In VS Code press:
Search:
If Flutter isn't installed, VS Code can guide you through downloading the SDK and adding it to PATH.
Alternatively: install Flutter manually
You can download the Flutter SDK yourself and extract it somewhere such as:
Then add:
to your Windows PATH.
Avoid putting the Flutter SDK inside locations that may create permission problems.
Restart VS Code/PowerShell after altering PATH.
Verify:
Then:
5. Run Flutter Doctor
This is one of the most useful Flutter setup commands:
It checks the development environment.
Initially, you might see something broadly like:
Don't worry if Android isn't ready yet. We're going to configure it next.
6. Install Android Studio
Even though you're developing in VS Code, install Android Studio.
Why?
It gives you the important Android components:
Flutter's current Android setup documentation recommends installing the latest stable Android Studio when targeting Android.
7. Install Android SDK components
Open Android Studio and go to:
More Actions → SDK Manager
or, with a project open:
Tools → SDK Manager
Under SDK Platforms, Flutter's current setup documentation instructs you to ensure an Android SDK platform is installed. At present, its setup page specifically references API level 36.
Then open:
SDK Tools
Ensure the relevant tooling is installed, including:
- Android SDK Build-Tools
- Android SDK Command-line Tools
- Android Emulator
- Android SDK Platform-Tools
- CMake
- NDK (Side by side)
These are the tools currently identified by Flutter's Android setup documentation.
8. Accept Android licenses
After installing the Android SDK tools, open PowerShell:
You'll receive license prompts.
Accept them as appropriate.
Then run:
Flutter's Android setup specifically requires accepting the Android SDK licenses after installing the prerequisites.
9. Create an Android Emulator
Now open Android Studio and open the Device Manager.
Create a virtual device.
For example:
Download the system image if Android Studio requests it.
Finish creating the device and click the Play ▶ button.
Android should boot in a separate emulator window.
10. Check whether Flutter recognizes the emulator
Once the emulator has started, run:
You should see the Android emulator listed as one of the available Flutter devices.
Also run:
At this point, the important Flutter/Android components should be healthy.
11. Create your first Flutter project
In PowerShell:
Open it in VS Code:
You'll get the structure we discussed earlier:
12. Run the application
Make sure the emulator is running.
Then from your VS Code terminal:
Flutter will:
You should see the default Flutter application running inside your Android emulator.
13. Run directly from VS Code
You don't have to keep using flutter run.
In the bottom-right area of VS Code, select your Android emulator as the target device.
Then:
or press:
Your workflow becomes:
14. Test Hot Reload
Open:
Find some text in the UI and change it.
For example, change:
to:
Save the file while the application is running.
Flutter's hot reload can update the running application without requiring a complete restart, which makes UI development significantly faster.
15. Your final environment
Once everything is configured, your development environment looks roughly like this:
The important distinction is:
VS Code → where you write/debug the application
Flutter SDK → builds and runs the Flutter/Dart application
Android SDK → provides Android build/deployment tools
Android Studio → convenient management of the SDK and emulator
Android Emulator → virtual Android phone where you test the app
Useful commands to remember
For your learning path, I'd do the setup in this order:
Windows setup → create first Flutter app → understand main.dart → Widgets → StatelessWidget vs StatefulWidget → layouts → navigation → forms → REST APIs → state management.
Comments
Post a Comment