How to Install Flutter on Windows

System Requirements

You can install Flutter on Windows with some minimum system requirements first, such as:

  • Operating System: Minimum Windows 10 (64bit), X86-64.
  • Disk space: Minimum 1.64GB of free disk space (not including for IDE/tools).
  • Tools: Flutter requires the following tools to be available in the Windows environment
    • Windows PowerShell 5.0 or later (This is usually installed with Windows 10)
    • Git for Windows 2.x. Download and install Git (Link: https://git-scm.com/download/win). If Git has been installed, make sure that git can be run at the command prompt or in PowerShell.

Get the Flutter SDK

  1. Download flutter SDK (link: https://docs.flutter.dev/development/tools/sdk/releases). Choose flutter version 3.3.10 to match the flutter version used in this tutorial.
  2. Extract the flutter zip file to the desired location, for example C:\src\flutter. However, what should be noted is:
    • Don’t install flutter with a folder that uses special characters or spaces.
    • Don’t install flutter in a directory that requires access privilege like C:\Program Files.

Related Articles

Update Path

in order to run flutter command in windows console, add flutter path in environment variable. follow these steps:

  • In the windows search bar, type ‘env’. And select Edit the system environment variables.
  • Click the Environment Variables button.
  • Select the path and click the edit button.
cara install flutter Pilih path
  • Click New and add C:\src\flutter\bin. Then click OK
cara install flutter menambahkan path flutter

To check if it’s running, please open a command prompt and type ‘where flutter dart’. Then it will appear like the image below:

cara install flutter where flutter dart

Check Other Flutter Tools

To check whether flutter can be run, or if there are still things that need to be completed, please open a command prompt and type ‘Flutter doctor‘. Then a description will appear as shown below:

cara install flutter cek dengan flutter doctor

From the image above, it can be seen that flutter requires Android studio and visual studio to be installed.

Install Android Studio

  1. Download and install Android Studio (link: https://developer.android.com/studio).
  2. Run Android studio, and enter the ‘Android Studio Setup Wizard’. This will install Android SDK, Android SDK Command-line tools and Android SDK Build-Tools. And everything flutter needs. There are 2 licenses that must be accepted, namely: android-sdk-licence and intel-android-extra-licence. Click license and Accept everything. Finally Click Finish.
cara install flutter android studio license agreement

After finishing installing Android studio, run Flutter doctor again to make sure that Android studio is installed. But if it’s not visible, it’s probably because the Android studio directory hasn’t been set correctly. please run flutter config –android-studio-dir . Enter the Android studio directory that was installed earlier. For example like this:

flutter config --android-studio-dir "C:\Program Files\Android\Android Studio"

Install Android SDK Command-line Tools (latest)

1.Enter Android studio, click More Action > click SDK Manager

cara install flutter android studio masuk sdk manager

2.Click the Android SDK menu > SDK Tools, then check the Android SDK Command-line Tools (latest) box. Click OK

cara install flutter android sdk command line tools

Install Visual Studio

  1. Download and install android studio (link: https://visualstudio.microsoft.com/downloads/). Here we will use Visual studio 2022 edition Community.
  2. Install visual studio Desktop development with C++ with all default components. Make sure that Windows 10 has a minimum version of 1909 before.
cara install flutter visual studio Desktop development with C

Android Device Settings (Mobile)

In order for an android device (phone) to be able to run flutter applications directly, we need an android device that uses Android version 4.1 (API level 16) or a newer version.

Here are the steps to activate it:

  1. Activate Developer options (developer options) and USB debugging on the android device (phone). The method may differ depending on the cellphone used. Here we try to give an example of a common way:
    • Go to settings > About phone > Software information > Click repeatedly on Version Number until a notification or request for a pin appears > enter the pin when prompted. Then a notification will appear that developer mode has been activated.
    • Go to settings > developer options > enable USB debugging
  2. Only for Windows: Install the Google USB driver by: Entering Android studio > More Action > SDK Manager > Select the SDK Tools menu > tick Google USB Driver, then click OK.
cara install flutter google usb driver

Use a USB cable and connect the phone to the computer. A notification will appear on the cellphone to allow the computer to access the cellphone. It will also appear to allow phone debugging. then Click Allow.

To check whether the cellphone is connected, please open a command prompt and run the command ‘flutter devices’ then it will appear as shown below. It can be seen that the SM J15f mobile device (mobile) is already connected.

cara install flutter cek flutter devices

Setup Android Emulator

1.Run Android studio, Select Virtual Device Manager > Create Device

cara install flutter android device manager

2.Select a category phone > Select a cellphone, for example, select Pixel 5

cara install flutter pilih hardware

3.Select a system image. Because earlier we used a cellphone with Android version 9.0, here we try to use the same version for use on the Android emulator.

4.Click the download icon as circled in the image below, then accept the license. Wait for the download process to finish.

cara install flutter pilih system image android

5.Run the emulator: Click the play icon as shown below

cara install flutter jalankan emulator

6.If successful, an emulator will appear as shown below

cara install flutter tampilan android emulator

Agree to the Android License

In order to use flutter, you must agree to the license of the Android SDK platform first.

Open command prompt then run the following command:

flutter doctor --android-licenses

And agree to all licenses by typing Y and enter.

cara install flutter menyetujui android lisensi

have been completed

Tinggalkan Balasan

Back to top button

Adblock terdeteksi

Silahkan nonaktifkan adblock terlebih dahulu. Terimakasih!