Installing Flutter on Windows, Mac and Linux

Installing Flutter on Windows, Mac and Linux

In the previous post, we’ve discussed the unique features of Flutter and reasons to use it for cross-platform application development.

Now, Let’s see how we can install Flutter on Windows, Mac and Linux. This post is divided into three sections.

Installing Flutter on Windows

Before starting the installation of Flutter, make sure that your system meets these minimum requirements.

  • Operating Systems: Windows 7 SP1 or later (64-bit)
  • Disk Space: At least 400 MB.
  • Tools: Flutter depends on these tools being available in your environment.
  • Windows PowerShell 5.0 or newer (this is pre-installed with Windows 10).

Installing Flutter SDK

  • Download Flutter SDK from the following link.

Download Flutter SDK for Windows

  • Extract the zip file and place the contained flutter in the desired installation location for the Flutter SDK. I’ve installed Flutter to D:\FlutterSDK.
  • Locateflutter_console.bat inside the flutter directory and double-click it to start.

Run flutter doctor

In the console that appears, run the flutter doctor command to find if there are any missing dependencies.

D:\FlutterSDK\flutter>flutter doctor

In case of any missing dependencies, add them first as described in the error and run the command again.

[-] 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://flutter.dev/setup/#android-setup for detailed instructions.

Installing Flutter on MacOS

For step-by-step

Before starting the installation of Flutter, make sure that your system meets these minimum requirements.

  • Operating Systems: macOS (64-bit)
  • Disk Space: At least 700 MB.

Installing Flutter SDK

  • Download Flutter SDK from the following link.

Download Flutter SDK for MAC

  • Extract the file in the desired location.
  • Add the flutter tool to your path.

Run flutter doctor

Run the following command to see if there are any missing dependencies.

$ flutter doctor

In case of any missing dependencies, add them first.

[-] 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://flutter.dev/setup/#android-setup for detailed instructions.

To know how to install XCode and set up an iOS simulator, read this article.

Android setup

Install Android Studio

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Platform-Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android.

Set up your Android device

To prepare to run and test your Flutter app on an Android device, you’ll need an Android device running Android 4.1 (API level 16) or higher.

  • Enable Developer options and USB debugging on your device.
  • Using a USB cable, plug your phone into your computer. If prompted on your device, authorize your computer to access your device.
  • In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device.

Set up the Android emulator

To prepare to run and test your Flutter app on the Android emulator, follow these steps:

  1. Enable VM acceleration on your machine.
  2. Launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device.
  3. Choose a device definition and select Next.
  4. Select a system image, and select Next.
  5. Click Finish.

Installing Flutter on Linux

Before starting the installation of Flutter, make sure that your system meets these minimum requirements.

  • Operating Systems: Linux (64-bit)
  • Disk Space: 600 MB (does not include disk space for IDE/tools).

Installing Flutter SDK

  • Download Flutter SDK from the following link and extract it to the desired directory for installation.

Download Flutter SDK for Linux

  • Add flutter/bin to PATH – To append the complete path of flutter/bin to the PATH variable, open .bash_profile  file in edit mode and add the following line at the end of the file. [PATH_TO_FLUTTER_SDK_DIRECTORY] =Get the complete path to flutter SDK directory.

Run flutter doctor

Run the following command to see if there are any missing dependencies.

$ flutter doctor

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

[-] 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://flutter.dev/setup/#android-setup for detailed instructions.

Android setup

Install Android Studio

  1. Download and install Android Studio.
  2. Start Android Studio, and go through the ‘Android Studio Setup Wizard’. This installs the latest Android SDK, Android SDK Platform-Tools, and Android SDK Build-Tools, which are required by Flutter when developing for Android.

Set up your Android device

  • Enable Developer options and USB debugging on your device.
  • Using a USB cable, connect your phone into your computer. If prompted on your device, authorize your computer to access your device.
  • In the terminal, run the flutter devices command to verify that Flutter recognizes your connected Android device.

Set up the Android emulator

Follow these steps to set up an Android emulator.

  1. Enable VM acceleration on your machine.
  2. Launch Android Studio > Tools > Android > AVD Manager and select Create Virtual Device.
  3. Choose a device definition and select Next.
  4. Select a system image, and select Next.
  5. Click Finish.
Share Tweet Send
0 Comments
Loading...
You've successfully subscribed to GeekInsta
Great! Next, complete checkout for full access to GeekInsta
Welcome back! You've successfully signed in
Success! Your account is fully activated, you now have access to all content.