# Get started

# Installation Guide

# Get the Flutter SDK

  • Get the Flutter SDK
  • Extract the zip file to a location (for example C:\src\flutter)

WARNING

Do not install Flutter in a directory like C:\Program Files\ that requires elevated privileges.

# Update your path

  • Add Flutter to the PATH environment (for example C:\src\flutter\bin)

# Install Visual Studio Code

  • In this course we will work with Visual Studio Code as editor for our Flutter applications
  • Download Visual Studio Code (VS Code)
  • Start VS Code and install the Flutter and Dart plugins - Invoke View > Command Palette…. - Type “install”, and select Extensions: Install Extensions. - Type “flutter” in the extensions search field, select Flutter in the list, and click Install. This also installs the required Dart plugin.

# Android setup

Note

Flutter relies on a full installation of Android Studio to supply its Android platform dependencies. However, you can write your Flutter apps in VS Code or some other editors.

# Android Studio

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

Check your installation with `flutter doctor`

  • From a console window that has the Flutter directory in the PATH (see above), run the following command to see if your setup is complete: flutter doctor

flutter doctor

  • You can ignore the Visual Studio (C++) warning, because we only target the Android platform

Troubleshooting: Unable to locate Android SDK

If Flutter can't locate your Android SDK (after following the Android Studio wizard), try the following command (with your own path to the Android SDK): flutter config --android-sdk <path-to-android-sdk>

Troubleshooting: Android toolchain

In case you get the following Android toolchain errors: flutter doctor

  • Install the Command-line Tools.
    • Android Studio UI: Open Android Studio UI and locate the SDK Manager (it's possible that you have to create a project before you can access the menu)
    • Command line: Locate your Android SDK (C:\Android-SDK or C:\Users\**username**\AppData\Local\Android\Sdk\tools\bin\sdkmanager or ...) Execute C:\Users\**username**\AppData\Local\Android\Sdk\tools\bin\sdkmanager --install "cmdline-tools;latest". Replace **username** with your username. C:\Users\**username**\AppData\Local\Android\Sdk\tools\bin\ is in most cases the path to the sdkmanager. Use another path if necessary.
  • Next install the Android licenses. Execute flutter doctor --android-licenses and accept all licenses
  • As already said, you can ignore the Visual Studio (C++) warning, because we only target the Android platform

Troubleshooting: Android Studio

  • Flutter & Dart plugin error can be ignored: we will use Visual Studio Code as IDE: flutter doctor plugins

  • Still not working? Try to upgrade your Flutter version: flutter channel dev && flutter upgrade

# Set up your Android device

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

# Set up the Android emulator

  • If you don't have an Android device you can test your flutter applications on the Android emulator.
  • Creating and configuring an Android emulator is a quite complex task, make sure to follow the steps from the Android emulator setup guide
Last Updated: 9/22/2023, 12:51:10 PM