4

I added the steps provided by docs.
I also added Android SDK to the environmental variable but it's still remaining an issue.

I also tried these steps but it didn't work.

enter image description here

Also asked on https://github.com/flutter/flutter/issues/19805

Günter Zöchbauer
  • 558,509
  • 191
  • 1,911
  • 1,506
Ramesh sambu
  • 3,431
  • 2
  • 23
  • 38

5 Answers5

19

For MAC:

AndroidStudio -> Preferences -> Appearance & Behavior -> System Settings -> 
Android SDK
  1. choose the SDK Tools Segment
  2. Check the Android SDK Command-line tool (latest)

enter image description here

Mike.R
  • 2,579
  • 2
  • 24
  • 33
5

Please try adding

G:\sdk\tools and G:\sdk\platform-tools to the PATH environment variable.

Günter Zöchbauer
  • 558,509
  • 191
  • 1,911
  • 1,506
1

See if it is configured this way in "Project Structure" enter image description here

It worked for me

J. Soares
  • 49
  • 4
0

It is little confusing. ANDROID_HOME location is not C:\Program Files\Android\Android Studio ANDROID_HOME location is C:\Users\username\AppData\Local

restart command prompt or Power Shell re-check flutter doctor

yongtaek jun
  • 127
  • 1
  • 3
0

I was using Windows 10 and I encounter this issue. I had tried ANDROID_HOME to my path but it was not working because I was forget to add tools and build-tools in path variable. try this Open Edit the system Environment Setting(Search in Windows search).

  • Click on Environments Variable -> Create New variable -> Variable Name ANDROID_HOME and path your SDK path.
  • Double Tap on PATH or Edit it Add platform-tools,build-tools,tools (All folders are in Your SDK path)

Reopen Terminal and type Flutter Doctor

Done