I have just started with mobile development using flutter, and there is this error when trying to run the default flutter program.
No connected devices found; please connect a device, or see flutter.dev/setup for getting started instructions.
This is a Windows 10 x64 machine.
Installed Android Studio in -
D:\Program Files\Android\Android Studio1
Installed Android SDK from Android Studio in -
Set these system environment variables
ANDROID_HOME - D:\Android\android-sdk;D:\Android\android-sdk\tools;D:\Android\android-sdk\build-tools;D:\Android\android-sdk\platform-tools
ANDROID_SDK_ROOT - D:\Android\android-sdk;D:\Android\android-sdk\tools;D:\Android\android-sdk\build-tools;D:\Android\android-sdk\platform-tools
Installed Nexus 6 API 28 device & set Emulated Performance Graphics to Hardware GLES-2.0
pie Android 9.0 x86&
pie Android 9.0 x86_64as I was unsure which one to use. The AVD emulator launches fine with both the OS. (Which one to use?)
Installed flutter in -
When I run main.dart, it shows this error:
When I run flutter doctor in the Android Studio it shows 2 issues:
[X] Android toolchain - develop for Android devices X ANDROID_HOME = D:/Android/android-sdk but Android SDK not found at this location. [!] Connected device ! No devices available
When I try to run a command in powershell from the flutter directory, it gives this error:
Solution 1: KitsuPixel
I think the error in the powershell means you did not add the Flutter SDK to your PATH as stated in the install documentation.
First follow the install documentation to add the Flutter SDK to your PATH, then close any PowerShell windows you have.
Open an emulator.
Open a PowerShell window.
Try to create a test project via the PowerShell like so
flutter create <project name> cd <project name> flutter run
Solution 2: rvgi
In environment variables > User Variables, add a new PATH, like: C:\src\flutter\bin
Then restart your machine.
Solution 3: Qwerty
I was able to solve this with @rgvi solution.
- Added new path to PATH variable -
- Executed the command
flutter doctor. This now showed that Android licenses status unknown.
- Executed the command
flutter doctor --android-licensesand accepted the licenses.
Solution 4: Muhamed Riyas M
I had faced similar issue, my android studio was detecting the phone but not listing under "Flutter Device Selection".
The problem was I was not configured the Porject SDK
To set up from android studio go to
File > Project Structure > Project SDK > "available sdk" > Apply
Solution 5: iawegfib
I had a similar issue. After relocating the android sdk, you need to run this in cmd/powershell to tell flutter where the Android is:
flutter config --android-sdk "your path"
Solution 6: Surbhi
The easiest solution, that worked for me was this :
Go in the terminal and first run -
flutter doctor --android-licenses
If you get no error and the output is something like this :
All SDK package licenses accepted.======] 100% Computing updates...
Then check if your emulators are recognized by Android studio (enter this in the terminal):
This will display the list of emulators you have added. Now enter this in your terminal
flutter emulators --launch emulator id
emulator id is the name of the emulator which you will get from the "flutter emulator" command, so the launch command should be like this :
example : flutter emulators --launch Pixel_4a_API_30
Pixel_4a_API_30 is my emulator's id or the name
as soon as you run this the emulator will launch.
This is what worked for me, hope it works for you!