I use Android Studio as my IDE in coding Flutter. I was able to create 2 projects before this and it worked absolutely fine. I had to clone a repo from Github. The IDE said to get config. I did that then this happened. enter image description here

I already installed sdk .

My android devices android version is 7.0 my android devices android version is 7.0

Flutter Doctor result:

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
    • Flutter version 1.12.13+hotfix.8 at C:\src\flutter\flutter
    • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/setup/#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[!] Android Studio
    • Android Studio at C:\Program
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    X android-studio-dir = C:\Program
    X Android Studio not found at C:\Program
    • Try updating or re-installing Android Studio.
    • Consider removing your android-studio-dir setting by running:
      flutter config --android-studio-dir=

[!] VS Code
    • VS Code at C:\Users\Tamim Mostafa\AppData\Local\Programs\Microsoft VS Code
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories.

I also tried changing the directory an using folder with no white space. I moved the Sdk folder to D:\Android\Sdk. flutter doctor -v:

[√] Flutter (Channel stable, v1.12.13+hotfix.8, on Microsoft Windows [Version 10.0.18363.720], locale en-US)
    • Flutter version 1.12.13+hotfix.8 at C:\src\flutter\flutter
    • Framework revision 0b8abb4724 (6 weeks ago), 2020-02-11 11:44:36 -0800
    • Engine revision e1e6ced81d
    • Dart version 2.7.0

[X] Android toolchain - develop for Android devices
    X ANDROID_HOME = D:\Android\Sdk
      but Android SDK not found at this location.

[√] Android Studio (version 3.6)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Flutter plugin version 44.0.2
    • Dart plugin version 192.7761
    • Java version OpenJDK Runtime Environment (build 1.8.0_212-release-1586-b04)

[!] Android Studio
    • Android Studio at C:\Program
    X Flutter plugin not installed; this adds Flutter specific functionality.
    X Dart plugin not installed; this adds Dart specific functionality.
    X android-studio-dir = C:\Program
    X Android Studio not found at C:\Program
    • Try updating or re-installing Android Studio.
    • Consider removing your android-studio-dir setting by running:
      flutter config --android-studio-dir=

[!] VS Code
    • VS Code at C:\Users\Tamim Mostafa\AppData\Local\Programs\Microsoft VS Code
    X Flutter extension not installed; install from
      https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter

[!] Connected device
    ! No devices available

! Doctor found issues in 4 categories.


Solution 1: Septian Dika

Thats warning said "Android SDK location should not contain whitespace". There is a whitespace character in Tamim Mustofa.

You can move sdk folder to new folder like D:\Android\Sdk, where there is no space or other whitespace character in the path. Change Android Sdk Location address in Android Studio. and add variabel ANDROID_HOME in your Environment Variable: System Variable. with D:\Android\Sdk as variable value


Solution 2: CoderUni

This seems to be the problem:

[X] Android toolchain - develop for Android devices
-> ANDROID_HOME = D:\Android\Sdk but Android SDK not found at this location.

Since you said that you added the Android SDK to your D directory, you could just add D:\Android\sdk\tools and D:\Android\sdk\platform-tools to your PATH environment variable. This is how you can add it to your Path enviroment variable: https://docs.telerik.com/teststudio/features/test-runners/add-path-environment-variables


Solution 3: Sayed Ahmed

It solved my problem:

  1. Make sure Flutter plugin is installed in android studio, you can install the plugin from file > setting > plugin
  2. choose flutter SDK path from File > setting> Language & Framework > flutter.

For my case the flutter sdk path was D:/flutter


Solution 4: gg-dev-05

Go to Tools > SDK Manager > SDK Tools and check Google USB Driver. Restart Android Studio. All this worked for me, might be helpful to someone.


Solution 5: WangYang

Some SDK versions of Flutter may cause the problem of not being able to find the device or simulator.You can switch the SDK version to the stable version. I had a same problem on my Mac with the Flutter version 1.17.4, and it worked after I went back the version to 1.17.3.

Version rollback step:

1.Open the Flutter GitHub repository.

2.Click 'master' button to open the switch menu. And the click 'Tags' item.

3.Search the stable version tag(e.g. 1.17.3).

4.Open the tag and click the commits.

5.Copy the top commit id.

6.Run the command 'git reset --hard $(commit id)' in the Flutter directory.

7.Restart the Android Studio.


Solution 6: Gabriel Rohden

It seems like this problem may have a lot of different symptoms, but for me to be able to run my flutter app in my android device, I had to set the android SDK in the Project Structure modal.

You can open the Project Structure modal by right clicking on the project root folder (in the file tree) > Module Settings > Project and set the Project SDK:

Mine is like this: enter image description here

If somehow the Project tab is disabled or in a weird state, I recommend you to close android studio, delete the project .iml file and the .idea folder, reopen the project in AS (open existing project) and set the android SDK in the project structure like I've described above. At least this is what I did and it fixed for me, so I hope this answer help someone.


Solution 7: Maki

I've had the same issue and what worked for me is to re-import the project.

File > Close Project, go to the project's directory and delete the .idea folder. Then File > Open... and re-open the project.

Open Project Structure, you can set the project's SDK with what you have. enter image description here

After this, I was able to run main.dart with the emulator. enter image description here


Solution 8: harlandgomez

It took me a while to find Project that the others are seeing, it's probably due to the updated version of Android Studio. I found it on External Libraries on the left panel and under it, right click on the Android API (NN) Platform > Open Library Settings > Project under Project Settings and on the right panel, change the Android API. I had <No SDK>, see screenshot.

enter image description here


Solution 9: muhammad obaid

All you need is to run Android Studio as Administrator.


Solution 10: chukai

File > Invalide caches/restart, work for me


Solution 11: Gavin Chebor

If you are using macOS and the other answers did not work, try this

flutter config --enable-macos-desktop


Solution 12: RASHMI RANJAN

This kind of problem I was facing so When I was done with Invalid caches/ restart then it automatically detect the main. dart and works fine.

Just give it a try with Invalid Caches/ Restart.


Solution 13: RASHMI RANJAN

  1. Check your Dart SDK and Flutter SDK path setup in the Environment variable setup and inside the setting of the android studio as well.
  2. If it is ok then Do Invalid Caches/ Restart the project and Check.

It might be helped. !!!


Solution 14: Noob

For me, going to device manager in android studio and running the emulator, fixed it. Thus the emulator has to be running before you can select it to run the application on, which makes sense I guess...

enter image description here

enter image description here


Solution 15: Sergio

In my case there was no package attribute in the android/app/src/main/AndroidManifest.xml file for the manifest tag. Adding it solved the problem:

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
    package="my.package.name">

OR

<manifest xmlns:android="http://schemas.android.com/apk/res/android"
    package="@applicationId">


Solution 16: bekirduran

type to terminal this below

flutter config --android-sdk ANDROID_SDK_PATH


Solution 17: ginkgo

Reading this page helped: by the time I reached the end of this page Android Studio had fully recognised my connected mobile phone (with developer mode enabled) and it was not longer greyed out in the Devices list.


Solution 18: nahoang

All you need is Updating the android SDK then restart the IDE.

enter image description here

That's it.