Unable to locate the android sdk flutter

Viewed 17672

I installed visual_stdio_code and trying to run "flutter doctor" then this is the error.
and when I run flutter doctor on Command Line and this is answer that I have:

flutter devices Unable to locate a development device; please run 'flutter doctor' for information about installing additional components.

Any help please!

enter image description here

enter image description here

3 Answers

Here's another solution just in case the answer above doesn't work.

Open Android Studio then click on SDK Manager (down-pointing arrow)

This should open a new box with your Android SDK Location at the top. It should look like this:

/Users/your-name/Library/Android/sdk

Copy that path, head to the Terminal and type this:

flutter config --android-sdk /Users/your-name/Library/Android/sdk

Next run:

flutter doctor --android-licenses

You can run flutter doctor to verify

That should help.

Step-1

Config the path of android-sdk:

# use `$ANDROID_HOME` if your android-sdk path is not below
$ flutter config --android-sdk /usr/local/share/android-sdk

Step-2

Add android-license to flutter

$ flutter doctor --android-licenses

Step-3

Check if it works

$ flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel master, v1.3.3-pre.18, on Mac OS X 10.14.3 18D109, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK version 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] Connected device (2 available)

• No issues found!

If you are using Windows your sdk path may be

/Users/yourUserName/Library/Android/sdk

or if are using linux the path maybe

/usr/local/share/android-sdk

Or

/home/yourUserName/Android/sdk

Then Try Executing

flutter config --android-sdk <your-android-sdk-path>
Related