You’re here because you’re getting the error that shows “flutter run: No connected devices” in your console. Here’s how you can fix “No Connected devices” in flutter.
I am trying to create a sample application with flutter (fresh installation) android studio is also installed (fresh installation)
Here is the output of
flutter run No connected devices.
the output of
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_US.UTF-8) [✓] Android toolchain - develop for Android devices (Android SDK 27.0.3) [✓] Android Studio (version 3.0) [!] VS Code (version 1.20.1) [!] Connected devices ! No devices available ! Doctor found issues in 2 categories.
Is there a solution to this problem?
Flutter supports both iOS and Android device/simulators.
In terminal, run the
flutter devices command to verify that Flutter recognizes your connected Android device.
Here is a reference document, How you can setup Device/Simulator to run your application.
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. Detailed instructions are available in the Android documentation.
- 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 devicescommand to verify that Flutter recognizes your connected Android device.
- Start your app by running flutter run.
By default, Flutter uses the version of the Android SDK where your adb tool is based. If you want Flutter to use a different installation of the Android SDK, you must set the ANDROID_HOME environment variable to that installation directory.
To prepare to run and test your Flutter app on the Android emulator, follow these steps:
- Enable VM acceleration on your machine.
- Launch Android Studio>Tools>Android>AVD Manager and select Create Virtual Device.
- Choose a device definition and select Next.
- Select one or more system images for the Android versions you want to emulate, and select Next. An x86 or x86_64 image is recommended.
- Under Emulated Performance, select Hardware – GLES 2.0 to enable hardware acceleration.
- Verify the AVD configuration is correct, and select Finish.For details on the above steps, see Managing AVDs.
- In Android Virtual Device Manager, click Run in the toolbar. The emulator starts up and displays the default canvas for your selected OS version and device.
- Start your app by running flutter run. The connected device name is Android SDK built for , where platform is the chip family, such as x86.
- Here is another document, if you’re using (Microsoft) Windows System: Get Started: Install on Windows
Open & Connect Device using Android Studio:
Here is an easier way to open and connect simulators/devices.
Android Studio shows a list of emulators/simulators (installed in your system) or devices (connected to your system). Just select a device, you want to open, from a list, and run project.
flutter config --android-sdk ANDROID_SDK_PATH
- Device Not Found (When setup Flutter in android studio)
- Project structure -> select latest ANDROID API in Project SDK
I solved the AVD problem with the flutter using the Flutter console.
C: \ Users \ valer> flutter emulators 6 available emulators: 3.2_QVGA_ADP2_API_22 _-_ Lollipop • 3.2in QVGA (ADP2) • Generic • 3.2 QVGA (ADP2) API 22 - Lollipop Android_ARMv7a Android_Accelerated_x86 Nexus S API Google Nexus S API 23 Nexus_S_API_25_1080x1920_Nougart_7.1.1_ • pixel • Google • Nexus S API 25 1080x1920 (Nougart 7.1.1) Pixel_API_28 • pixel • Google • Pixel API 28
To run an emulator, run
flutter emulators --launch <emulator id>.
C: \ Users \ valer> flutter emulators --launch Pixel_API_28
You can also go to File>Project Structure and select latest sdk.