Skip to main content

Get started

About 3 min

Get started

Installation Guide

Get the Flutter SDK

Flutter version 3.44.0

  • Sometimes version changes can cause the AR integration with Vuforia/Unity to stop working in Flutter. We, the instructors, have tested and approved Flutter version 3.44.0 for this course.

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 Codeopen in new window (VS Code)
  • Start VS Code and install the Flutter and Dart plugins
    • 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 Studioopen in new window
  • 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
flutter doctor

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

Troubleshooting: Android licenses

If flutter doctor --android-licenses doesn't work, try to install a different version of the Android SDK Command-line Tools. For us, version 20 works perfectly fine!

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 7.0 Nougat (SDK level 24) or higher.

Wireless debugging with adb

You can also run and debug Flutter apps on an Android phone without a USB cable.

First make sure adb is available in your terminal. adb.exe is part of the Android SDK platform tools. On Windows this is usually:

C:\Users\your-username\AppData\Local\Android\Sdk\platform-tools

Add this folder to your PATH if the adb command is not recognized.

On your Android phone:

  • Enable Developer options.
  • Enable Wireless debugging.
  • Make sure your computer and phone are on the same Wi-Fi network.
  • Check the IP address and port shown by Android.

First-time pairing: Pair the device from a terminal. On your smartphone, select Pair device with pairing code. This will display an IP address and port. Run the following command:

adb pair PHONE_IP_ADDRESS:PORT

Then connect from a terminal (pay attention, this is another port!):

adb connect PHONE_IP_ADDRESS:PORT

Check if the device is connected:

adb devices

If Android asks for permission, allow debugging on the phone. The device should then appear in VS Code and in flutter devices.

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 guideopen in new window