Flutter run: No connected devices

Share this post

One of the first problems new Flutter users might come across is the fact that after running flutter run command an error appears saying that there are no connected devices. The error looks like this:

No supported devices connected.

The reason for this error is that after installing Flutter and being able to run the flutter commands, we still need to have some kind of device running. That could be either a physical device or an emulator like an iOS simulator or an Android emulator.

Open the iOS simulator

Using the terminal

In macOS, you can easily open the iOS simulator by typing open -a simulator in your terminal. Obviously you need to have Xcode installed. This command will by default open a simulator with the latest version of iOS that you have installed on your system.

Using Visual Studio Code

Visual Studio Code has great support for Flutter and I would definitely recommend you to use it, especially if you are developing for both Android and iOS. To easily access devices in VS Code, you need to download Dart and Flutter extensions. You either follow the links or just search for them in the extensions menu.

Once you installed those extensions you can now find and open the devices that are available on your system directly from within Visual Studio Code. Just follow these steps:

  • Open the Flutter project that you created with flutter create
  • Click on No Device button in the bottom toolbar in VS Code.
VS Code bottom toolbar
  • A list will open letting you choose which device you want
VS Code device list

Open an Android Emulator

To be able to develop for Android with Flutter and getting everything you need, you must install Android Studio first. You can then install any emulator you want to test different versions of Android.

Using the terminal

For this, you can follow this link which explains it in detail. In order for emulator command to work, you should follow this excellent explanation on how to do it.

Using Visual Studio Code

After installing Android Studio you should be able to follow the iOS instructions above and you’re good to go.