Learn how to set up your development environment to run, build, and deploy Flutter apps for Android devices.

Choose your development platform

#

The instructions on this page are configured to cover setting up Android development on a Windows device.

If you'd like to follow the instructions for a different OS, please select one of the following.

Set up Android tooling

#

With Android Studio, you can run Flutter apps on a physical Android device or an Android Emulator.

If you haven't done so already, install and set up the latest stable version of Android Studio.

  1. Install prerequisites libraries

    If you're developing on Linux, first install the prerequisite collection of 32-bit libraries that Android Studio requires.

  2. Install Android Studio

    If you haven't done so already, install and set up the latest stable version of Android Studio.

    If you already have Android Studio installed, ensure that it's up to date.

  3. Install Android SDK and tools

    1. Launch Android Studio.

    2. Go to the Settings page to view the SDK Manager.

    3. If you have a project open, go to Tools > SDK Manager.

    4. If the Welcome to Android Studio dialog is open, click the More Options icon that follows the Open button, then click SDK Manager from the dropdown menu.

    5. If the SDK Platforms tab is not open, switch to it.

    6. Verify that the first entry with an API Level of 35 has been selected.

      If the Status column displays Update available or Not installed:

      1. Select the checkbox for that entry or row.

      2. Click Apply.

      3. When the Confirm Change dialog displays, click OK.

        The SDK Component Installer dialog displays with a progress indicator.

      4. When the installation finishes, click Finish.

    7. Switch to the SDK Tools tab.

    8. Verify that the following SDK Tools have been selected:

      • Android SDK Build-Tools
      • Android SDK Command-line Tools
      • Android Emulator
      • Android SDK Platform-Tools
    9. If the Status column for any of the preceding tools displays Update available or Not installed:

      1. Select the checkbox for the necessary tools.

      2. Click Apply.

      3. When the Confirm Change dialog displays, click OK.

        The SDK Component Installer dialog displays with a progress indicator.

      4. When the installation finishes, click Finish.

  4. Agree to the Android licenses

    Before you can use Flutter and after you install all prerequisites, agree to the licenses of the Android SDK platform.

    1. Open your preferred terminal.

    2. Run the following command to review and sign the SDK licenses.

      flutter doctor --android-licenses
    3. Read and accept any necessary licenses.

      If you haven't accepted each of the SDK licenses previously, you'll need to review and agree to them before developing for Android.

      Before agreeing to the terms of each license, read each with care.

      Once you've accepted all the necessary licenses successfully, you should see output similar to the following:

      All SDK package licenses accepted.

Set up an Android device

#

You can debug Flutter apps on physical Android devices or by running them on an Android emulator.

To set up your development environment to run a Flutter app on an Android emulator, follow these steps:

  1. Set up your development device

    Enable VM acceleration on your development computer.

  2. Set up a new emulator

    1. Start Android Studio.

    2. Go to the Settings dialog to view the SDK Manager.

      1. If you have a project open, go to Tools > Device Manager.

      2. If the Welcome to Android Studio dialog is open, click the More Options icon that follows the Open button, then select Device Manager from the dropdown menu.

    3. Click Virtual.

    4. Click Create Device.

      The Virtual Device Configuration dialog displays.

    5. Select either Phone or Tablet under Category.

    6. Select a device definition. You can browse or search for the device.

    7. Click Next.

    8. Click either x86 Images or ARM Images depending on if your development computer is an x64 or Arm64 device.

    9. Click one system image for the Android version you want to emulate.

      1. If the desired image has a Download icon to the right of the Release Name, click it.

        The SDK Quickfix Installation dialog displays with a progress indicator.

      2. When the download completes, click Finish.

    10. Click Next.

      The Virtual Device Configuration displays its Verify Configuration step.

    11. To rename the Android Virtual Device (AVD), change the value in the AVD Name box.

    12. Click Show Advanced Settings and scroll to Emulated Performance.

    13. From the Graphics dropdown menu, select Hardware - GLES 2.0.

      This enables hardware acceleration, improving render performance.

    14. Verify your AVD configuration. If it is correct, click Finish.

      To learn more about AVDs, check out Managing AVDs.

  3. Try running the emulator

    In the Device Manager dialog, click the Run icon to the right of your desired AVD.

    The emulator should start up and display the default canvas for your selected Android OS version and device.

  4. Verify the emulator setup

    To verify that Flutter can connect to the emulator you set up, run flutter emulators in your preferred terminal:

    flutter emulators

    The emulator you set up should be found and show up as one of the available emulators.

To set up your development environment to run a Flutter app on a physical Android device, follow these steps:

  1. Configure your device

    Enable Developer options and USB debugging on your device as described in Configure on-device developer options.

  2. Enable wireless debugging

    To leverage wireless debugging, enable Wireless debugging on your device as described in Connect to your device using Wi-Fi.

  3. Install platform prerequisites

    If you're developing on Windows, first install the necessary USB driver for your particular device as described in Install OEM USB drivers.

  4. Connect your device

    Plug your device into your computer. If your device prompts you, authorize your computer to access your Android device.

  5. Verify the device connection

    To verify that Flutter recognizes your connected Android device, run flutter devices in your preferred terminal:

    flutter devices

    Your device should be found and show up as a connected device.

Validate your setup

#
  1. Check for toolchain issues

    To check for any issues with your Android development setup, run the flutter doctor command in your preferred terminal:

    flutter doctor

    If you see any errors or tasks to complete under the Android toolchain or Android Studio sections,

    Complete any mentioned tasks and then run flutter doctor again to verify any changes.

  2. Check for Android devices

    To ensure you set up your emulator and/or physical Android device correctly, run flutter emulators and flutter devices in your preferred terminal:

    flutter emulators && flutter devices

    Depending on if you set up an emulator or a device, at least one should output an entry with the platform marked as android.

  3. Troubleshoot setup issues

    If you need help resolving any setup issues, check out Install and setup troubleshooting.

    If you still have issues or questions, reach out on one of the Flutter community channels.

Start developing for Android

#

Now that you've set up Android development for Flutter, you can continue your Flutter learning journey while testing on Android or begin improving integration with Android.