Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

No Connected Devices Found in a Flutter App in Android Studio

I read StackOverflow questions including the following ones:

  • flutter run: No connected devices

  • No connected devices found; please connect a device

  • Android studio - flutter: No Connected Devices

BUT, I couldn't solve my issue....... :-(


My Flutter folder structure

  • D:\src\flutter

  • D:\src\sdk

My Project folder location : D:\__GitHub


Flutter SDK Setup Steps

  • Add the following User environment variable

    • Variable Name : ANDROID_SDK_ROOT

    • Variable Value : D:\src\sdk

  • Edit the "PATH" variable in the User enviroment variable

    • D:\src\flutter\bin;

    • %ANDROID_SDK_ROOT%\tools;

    • %ANDROID_SDK_ROOT%\platform-tools;

  • Run flutter config --android-sdk [sdk location] in the terminal

  • Run flutter doctor --android-licenses in the terminal


Launch an AVD in the emulator

  • D:\__GitHub\netninja_flutter_app > flutter doctor --android-licenses

    • All SDK package licenses accepted
  • D:\__GitHub\netninja_flutter_app > flutter emulator

    • Pixel_2_API_28
  • D:\__GitHub\netninja_flutter_app > flutter emulator --launch Pixel_2_API_28

    • enter image description here

enter image description here

  • When clicked, "Nothing here" shows up.

enter image description here

  • When clicked, the following message pops up.

    enter image description here

enter image description here

  • When clicked, the following window shows up.

    enter image description here

    • I added a virtual device.

Flutter Doctor

  • D:\__GitHub\netninja_flutter_app > flutter doctor -v

    • [✓] Flutter (Channel stable, 1.22.2, on Microsoft Windows [Version 6.1.7601], locale en-US)

      • [✓] Flutter version 1.22.2 at D:\src\flutter

      • [✓] Framework revision 84f3d28555 (9 days ago), 2020-10-15 16:26:19 -0700

      • [✓] Engine revision b8752bbfff

      • [✓] Dart version 2.10.2

    • [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.)

      • [✓] Android SDK at D:\src\sdk

      • [✓] Platform android-30, build-tools 30.0.2

      • [✓] ANDROID_SDK_ROOT = D:\src\sdk

      • [✓] Java binary at: D:_programs\Android\jre\bin\java

      • [✓] Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

      • [✓] All Android licenses accepted

    • [✓] Android Studio (version 4.1.0)

      • [!] Flutter plugin not installed; this adds Flutter specific functionality

      • [!] Dart plugin not installed; this adds Dart specific functionality

      • [✓] Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b01)

=> I installed "Dart" & "Flutter" plugins. So, I don't know why the error message says that those plugins are not installed. (This answer says just ignore the error message. So, I did so.) enter image description here


QUESTION! How could I connect a device to this project?


like image 714
Lim Avatar asked Oct 22 '25 04:10

Lim


1 Answers

I finally solved the issue !!!

The following is steps I took to solve the problem:

  1. Deleted Android Studio and all of related folders in the computer.

2-1. Create "src" folder in the C drive.

2-2. C:\src> git clone https://github.com/flutter/flutter.git -b stable

2-1. Type "Environment Variables" in the search box in your computer. 2-2. Under "System Variables > Path", add "C/src/flutter/bin".


  1. Install "Android Studio"

3-1. Android Studio Intro Page > Configure > SDK Manager

enter image description here

enter image description here

enter image description here

3-2. Android Studio > Configure > Plugins > Browse Repositories (Install Dart & Flutter) enter image description here


  1. Go to "C:\src\flutter".

4-1. Run "flutter doctor --android-licenses"

4-2. Run "flutter channel beta"

4-3. Run "flutter upgrade"

enter image description here


  1. Type "Environment Variables" in the search box in your computer.

5-2. Under "System Variables > Path", add the following:

  • C:\Users\USER\AppData\Local\Android\Sdk
  • C:\Users\USER\AppData\Local\Android\Sdk\platform-tools
  • C:\Users\USER\AppData\Local\Android\Sdk\tools

5-3. Under "System Variables", add the following:

  • Variable Name : "ANDROID_SDK_ROOT"
  • Variable Value : "C:\Users\USER\AppData\Local\Android\Sdk"

  1. Go to "C:\src\flutter". 6-1. Run "flutter config --android-sdk C:\Users\USER\AppData\Local\Android\Sdk"

  1. Open Android Studio.

7-1. Ctrl + Shift + Alt + S > Project Settings > Project > Change "<No SDK>" to the latest version. enter image description here

7-2. Click "AVD Manager" icon. enter image description here

7-3. Click "Launch this AVD in the emulato" icon enter image description here


  1. Success!

enter image description here

enter image description here

like image 135
Lim Avatar answered Oct 25 '25 17:10

Lim



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!