Flutter Doctor found issue Android_Home

8,295

Solution 1

My device was not getting detected by VS Code so , when i searched i found you need to set Android sdk location in Flutter environment for VS code to detect Device so i went to Flutter sdk folder C:\Research\flutter and double clicked on flutter_console which opened a Flutter console and run command flutter config --android-sdk C:\Users\annur.arya\AppData\android-sdk and now it works enter image description here

Solution 2

I just added a solution because the solution is not clear in the comments

You have to use this command to set the ANDROID_HOME to your SDK path

export ANDROID_HOME="YOUR_SDK_PATH"

According to this discussion, some people had to set both ANDROID_HOME and ANDROID_SDK_ROOT to SDK path just like this

export ANDROID_SDK_ROOT="YOUR_SDK_PATH"
export ANDROID_HOME=$ANDROID_SDK_ROOT

Solution 3

It's possible that ANDROID_HOME is not set to the same value in both of these cases; try running echo %ANDROID_HOME both in the location that works and the terminal where it doesn't. If these values are different, you'll need to figure out why (my guess would be that either you've changed it and not rebooted, or it's being set in a startup script that's only running in one of the contexts).

Share:
8,295
sandeep
Author by

sandeep

Updated on December 04, 2022

Comments

  • sandeep
    sandeep over 1 year

    I am trying to setup Flutter in windows 10. I have:

    • Android Studio installed
    • Visual Studio Code

    When I run "andoid doctor" in command prompt is shows no errors: enter image description here

    But When I try to configure VSCode Editer with steps given in https://flutter.io/get-started/editor/

    It Throws error as show below: enter image description here

    I tried after setting environment variable as: ANDROID_HOME = F:\Program Files\Android

    Even after setting the above I get the same error.