Unable to locate a development device; please run 'flutter doctor' .. but doctor checks out ok

11,277

Solution 1

open Terminal in Android Studio or VS Code.

and writes this command :

flutter config --android-sdk <sdk-location>

SDK-location is your Path for SDK! for Example :

flutter config --android-sdk /home/sanaebadi/Pasport/programming/and_dev/sdk/sdk-tools-linux-3859397/

Solution 2

I had the same problem , then I tried this solution , and it helped me and my flutter app is running on my phone ..

all you need to do is install Android API level 29 (Android 9.0+ "Q") go to Setting > Android SDK >SDK platform>Check Android 9+ and Press Apply button

I found this solution from github .. her is the link .. Hope this help you

https://github.com/flutter/flutter/issues/22649#issuecomment-520472515

Share:
11,277

Related videos on Youtube

Geoff
Author by

Geoff

Updated on June 04, 2022

Comments

  • Geoff
    Geoff almost 2 years

    A new installation of flutter/dart went smoothly without issue .. running "flutter doctor -v" gives the following output:

     $ flutter doctor -v
    [✓] Flutter (Channel beta, v0.11.9, on Linux, locale en_AU.UTF-8)
    • Flutter version 0.11.9 at /home/jedaa/bin/flutter
    • Framework revision d48e6e433c (3 days ago), 2018-11-20 22:05:23 -0500
    • Engine revision 5c8147450d
    • Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
    
    [✓] Android toolchain - develop for Android devices (Android SDK 28.0.2)
    • Android SDK at /home/jedaa/bin/Android/sdk
    • Android NDK location not configured (optional; useful for native 
    profiling support)
    • Platform android-28, build-tools 28.0.2
    • ANDROID_HOME = /home/jedaa/bin/Android/sdk
    • Java binary at: /opt/android314/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136- 
    b06)
    • All Android licenses accepted.
    
    [✓] Android Studio (version 3.2)
    • Android Studio at /opt/android314
    • Flutter plugin version 30.0.1
    • Dart plugin version 181.5656
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136- 
    b06)
    
    [✓] IntelliJ IDEA Community Edition (version 2018.2)
    • IntelliJ at /opt/idea
    • Flutter plugin version 30.0.2
    • Dart plugin version 182.5124
    
    [✓] VS Code (version 1.29.1)
    • VS Code at /usr/share/code
    • Flutter extension version 2.20.0
    
    [!] Connected device
    ! No devices available
    
    ! Doctor found issues in 1 category.
    

    and yet attempting to run the defalut starter app "flutter/material.dart" results in ... "Unable to locate a development device; please run 'flutter doctor' for information about installing additional components" ... irrespective whether i use Intellij or Visual Studio.

    However,

    $ flutter devices
    1 connected device:
    
    Pixel XL • HT69R0205363 • android-arm64 • Android 9 (API 28)     
    

    I have searched the web and found similar complaints .. but no solution. I was hoping that someone might be able to throw some light on this as I am sure it must be something simple and straight forward.

    Visual Studio is a new installation but I have been using Intellij now for 6 months on a daily basis and rarely have issue with it .. especially one that i cannot fix. :)

    Thank you in advance.

    • najdat Akkad
      najdat Akkad about 3 years
      Am I the only one that tried all of the answers and none worked?
  • Lone_Coder
    Lone_Coder over 4 years
    flutter config --android-sdk <sdk-location> ,sdk is in lower case
  • Sana Ebadi
    Sana Ebadi over 4 years
    I test this command and is correct. maybe with lowercase is correct too