SDK setup

For MacOS

System requirements

To install and run Flutter, your development environment must meet these minimum requirements:

  • Operating Systems: macOS
  • Disk Space: 2.8 GB (does not include disk space for IDE/tools).
  • Tools: Flutter uses git for installation and upgrade. We recommend installing Xcode , which includes git, but you can also install git separately.

Important: If you’re installing on an Apple Silicon Mac, you must have the Rosetta translation environment available for some ancillary tools. You can install this manually by running:

$ sudo softwareupdate --install-rosetta --agree-to-license

Get the Flutter SDK

1. Download the following installation bundle to get the latest stable release of the Flutter SDK:


For other release channels, and older builds, see the SDK releases page.

2. Extract the file in the desired location, for example:

$ cd ~/development

$ unzip ~/Downloads/flutter_macos_3.19.6-stable.zip

3. Add the flutter tool to your path:

$ export PATH="$PATH:`pwd`/flutter/bin"

This command sets your PATH variable for the current terminal window only. To permanently add Flutter to your path, see Update your path.

Run flutter doctor

Run the following command to see if there are any dependencies you need to install to complete the setup (for verbose output, add the -v flag):

$ flutter doctor

This command checks your environment and displays a report to the terminal window. The Dart SDK is bundled with Flutter; it is not necessary to install Dart separately. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).

For example:

[-] Android toolchain - develop for Android devices
• Android SDK at /Users/obiwan/Library/Android/sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://docs.flutter.dev/setup/#android-setup for detailed instructions.

The following sections describe how to perform these tasks and finish the setup process.

Once you have installed any missing dependencies, run the flutter doctor command again to verify that you’ve set everything up correctly.

Downloading straight from GitHub instead of using an archive

This is only suggested for advanced use cases.

You can also use git directly instead of downloading the prepared archive. For example, to download the stable branch:

$ git clone https://github.com/flutter/flutter.git -b stable

Update your path, and run flutter doctor. That will let you know if there are other dependencies you need to install to use Flutter (e.g. the Android SDK).

If you did not use the archive, Flutter will download necessary development binaries as they are needed (if you used the archive, they are included in the download). You may wish to pre-download these development binaries (for example, you may wish to do this when setting up hermetic build environments, or if you only have intermittent network availability). To do so, run the following command:

$ flutter precache

For additional download options, see flutter help precache.

Update your path

You can update your PATH variable for the current session at the command line, as shown in Get the Flutter SDK. You’ll probably want to update this variable permanently, so you can run flutter commands in any terminal session.

The steps for modifying this variable permanently for all terminal sessions are machine-specific. Typically you add a line to a file that is executed whenever you open a new window. For example:

  • Determine the path of your clone of the Flutter SDK. You need this in Step 3.
  • Open (or create) the rc file for your shell. Typing echo $SHELL in your Terminal tells you which shell you’re using. If you’re using Bash, edit $HOME/.bash_profile or $HOME/.bashrc. If you’re using Z shell, edit $HOME/.zshrc. If you’re using a different shell, the file path and filename will be different on your machine.
  • Add the following line and change [PATH_OF_FLUTTER_GIT_DIRECTORY] to be the path of your clone of the Flutter git repo: $ export PATH="$PATH:[PATH_OF_FLUTTER_GIT_DIRECTORY]/bin"
  • Run source $HOME/. to refresh the current window, or open a new terminal window to automatically source the file
  • Verify that the flutter/bin directory is now in your PATH by running: $ echo $PATH
  • Verify that the flutter command is available by running: $ echo $PATH

For Windows

System requirements

For other release channels, and older builds, see the SDK releases page.

To install and run Flutter, your development environment must meet these minimum requirements:

  • Operating Systems: Windows 10 or later (64-bit), x86-64 based.
  • Disk Space: 1.64 GB (does not include disk space for IDE/tools).
  • Tools: Flutter depends on these tools being available in your environment.
    • Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10)
    • Git for Windows 2.x, with the Use Git from the Windows Command Prompt option. If Git for Windows is already installed, make sure you can run git commands from the command prompt or PowerShell.

Get the Flutter SDK

1. Download the following installation bundle to get the latest stable release of the Flutter SDK:

Flutter_windows_3.19.6-stable.zip

For other release channels, and older builds, see the SDK releases page.

2. Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK (for example, C:\src\flutter). If you don’t want to install a fixed version of the installation bundle, you can skip steps 1 and 2. Instead, get the source code from the Flutter repo on GitHub, and change branches or tags as needed. For example:

C:\src>git clone https://github.com/flutter/flutter.git -b stable

You are now ready to run Flutter commands in the Flutter Console.

Update your path

If you wish to run Flutter commands in the regular Windows console, take these steps to add Flutter to the PATH environment variable:

  • From the Start search bar, enter ‘env’ and select Edit environment variables for your account.
  • Under User variables check if there is an entry called Path:
    • If the entry exists, append the full path to flutter\bin using ; as a separator from existing values.
    • If the entry doesn’t exist, create a new user variable named Path with the full path to flutter\bin as its value.

You have to close and reopen any existing console windows for these changes to take effect.

Run flutter doctor

From a console window that has the Flutter directory in the path (see above), run the following command to see if there are any platform dependencies you need to complete the setup:

C:\src\flutter>flutter doctor

This command checks your environment and displays a report of the status of your Flutter installation. Check the output carefully for other software you might need to install or further tasks to perform (shown in bold text).

For example:

[-] Android toolchain - develop for Android devices
• Android SDK at D:\Android\sdk
✗ Android SDK is missing command line tools; download from https://goo.gl/XxQghQ
• Try re-installing or updating your Android SDK,
visit https://docs.flutter.dev/setup/#android-setup for detailed instructions.

The following sections describe how to perform these tasks and finish the setup process. Once you have installed any missing dependencies, you can run the flutter doctor command again to verify that you’ve set everything up correctly.

For Linux

Verify system requirements

To install and run Flutter, your Linux environment must meet the following hardware and software requirements.

Hardware requirements

Your Linux Flutter development environment must meet the following minimal hardware

Requirement Minimum Recommended
CPU Cores 4 8
Memory in GB 8 16
Display resolution in pixels 8 WXGA (1366 x 768) FHD (1920 x 1080)
Free disk space in GB 11.0 60.0

Software requirements

To write and compile Flutter code for Android, you must have the following version of Linux and the listed software packages.

Operating system

Flutter supports Debian Linux 11 or later and Ubuntu Linux 20.04 LTS or later .

Development tools

To develop Flutter on Linux:

  • 1. Verify that you have the following tools installed: bash, file, mkdir, rm, which

$ which bash file mkdir rm which
/bin/bash
/usr/bin/file
/bin/mkdir
/bin/rm
which: shell built-in command

$ sudo apt-get update -y && sudo apt-get upgrade -y;

$ sudo apt-get install -y curl git unzip xz-utils zip libglu1-mesa

  • 3.To develop Android apps:
    • 1. Install the following prerequisite packages for Android Studio: libc6:i386,

    libncurses5:i386, libstdc++6:i386, lib32z1, libbz2-1.0:i386

    $ sudo apt-get install \
    libc6:i386 libncurses5:i386 \
    libstdc++6:i386 lib32z1 \ Libbz2-1.0:i386

    • 2.Install Android Studio 2023.2.1 (Iguana) or later to debug and compile Java or Kotlin

    code for Android. Flutter requires the full version of Android Studio.

    When you run the current version of flutter doctor, it might list a different version of one of these packages. If it does, install the version it recommends.

    The developers of the preceding software provide support for those products. To troubleshoot installation issues, consult that product's documentation.

    Configure a text editor or IDE

    You can build apps with Flutter using any text editor or integrated development environment (IDE) combined with Flutter's command-line tools.

    Using an IDE with a Flutter extension or plugin provides code completion, syntax highlighting, widget editing assists, debugging, and other features.

    Popular options include:

    Visual Studio Code 1.77 or later with the Flutter extension for VS Code.

    Android Studio 2023.2.1 (Iguana) or later with the Flutter plugin for IntelliJ.

    intelliJ IDEA 2023.2 or later with the Flutter plugin for IntelliJ.

    Install the Flutter SDK

    To install Flutter, download the Flutter SDK bundle from its archive, move the bundle to where you want it stored, then extract the SDK.

    1. Download the following installation bundle to get the latest stable release of the Flutter SDK:

    flutter_linux_3.19.6-stable.tar.xz

    For other release channels, and older builds, check out the SDK archive. The Flutter SDK should download to the Linux default download directory: ~/Downloads/.

    2. Create a folder where you can install Flutter. Consider creating a directory at /usr/bin/.

    3. Extract the zip file into the directory you want to store the Flutter SDK.

    $ ~/Downloads/flutter_linux_3.19.6-stable.tar.xz /usr/bin/ When finished, the Flutter SDK should be in the /usr/bin/flutter directory.

    Add Flutter to your PATH

    1. To run Flutter commands in a shell, add Flutter to the PATH environment variable.

    $ echo $SHELL

    This differs from another command that tells you which shell runs in your current console.

    $ echo $0

    2. To add Flutter to your PATH, expand the entry for your default shell, then choose the Command.

    • bash command:
    • $ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.bash_profile
    • zsh command:
    • $ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.zshenv
    • fish command:
    • $ fish_add_path -g -p $HOME/development/flutter/bin
    • csh command:
    • $ echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.cshrc
    • tcsh command:
    • $ echo 'setenv PATH "$HOME/development/flutter/bin:$PATH"' >> ~/.tcshrc
    • ksh command:
    • $ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
    • sh command:
    • $ echo 'export PATH="$HOME/development/flutter/bin:$PATH"' >> ~/.profile
    • 3. To apply this change, restart all open terminal sessions.

    Check your development setup

    Run Flutter doctor

    The flutter doctor command validates that all components of a complete Flutter development environment for Linux.

    • Open a shell.
    • To verify your installation of all the components, run the following command. $ flutter doctor

    As you chose to develop for Android, you do not need all components. If you followed this guide, the result of your command should resemble:

    Running flutter doctor...
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.19.6, on Ubuntu 20.04 (LTS), locale en)
    [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.5)
    [!] Chrome - develop for the web
    [✓] Android Studio (version 2023.3)
    [!] Linux toolchain - develop for Linux desktop
    [✓] VS Code (version 1.89)
    [✓] Connected device (1 available)
    [✓] Network resources

    ! Doctor found issues in 2 categories.

    Troubleshoot Flutter doctor issues

    When the flutter doctor command returns an error, it could be for Flutter, VS Code, Android Studio, the connected device, or network resources.

    If the flutter doctor command returns an error for any of these components, run it again with the verbose flag.

    $ flutter doctor -v

    Check the output for other software you might need to install or further tasks to perform.

    If you change the configuration of your Flutter SDK or its related components, run flutter doctor again to verify the installation.