18

I've been trying to get flutter to detect the Android SDK.

flutter doctor

returns

PS I:\Projects\Flutter\fluttertest\flutterproject> flutter doctor -v
[√] Flutter (Channel beta, v0.1.5, on Microsoft Windows [Version 10.0.16299.248], locale en-US)
• Flutter version 0.1.5 at I:\Source\flutter
• Framework revision 3ea4d06340 (7 days ago), 2018-02-22 11:12:39 -0800
• Engine revision ead227f118
• Dart version 2.0.0-dev.28.0.flutter-0b4f01f759

[!] Android toolchain - develop for Android devices
• Android SDK at C:\NVPACK\android-sdk-windows
• Android NDK location not configured (optional; useful for native profiling support)
• ANDROID_HOME = C:\NVPACK\android-sdk-windows
X Android SDK is missing command line tools; download from "link to google"
• Try re-installing or updating your Android SDK, visit https://flutter.io/setup/#android-setup for detailed instructions.

[√] Android Studio (version 3.0)
• Android Studio at C:\Program Files\Android\Android Studio
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[√] VS Code (version 1.20.1)
• VS Code at C:\Program Files\Microsoft VS Code
• Dart Code extension version 2.9.2

[√] Connected devices (1 available)
• Nexus 6P • 8XV7N16A04000597 • android-arm64 • Android 8.1.0 (API 27)

! Doctor found issues in 1 category.

flutter doctor - output

I've tried downloading the SDK Tools Package and even Installed Android Studio and added it to PATH, but was unable to resolve the issue.
The current Android installation sits in a directory called C:\NVPACK, and although I do remember fiddling with it, I don't remember which program installed it. I'm considering removing it. Any help would be greatly appreciated.

PATH Variable

9 Answers 9

23

Flutter provide command to update our Android SDK path:

Use flutter config --android-sdk <path-to-your-android-sdk-path>

Or just add a variable ANDROID_HOME with your sdk location in user variables

Sign up to request clarification or add additional context in comments.

3 Comments

by the "path" you mean android sdk (which has directory like platform-tools and so) or flutter sdk (which has directory like bin, dev and so)??
@rezalaki like this C:\Users\Developer\AppData\Local\Android\Sdk
@rezalaki, you're welcome indeed! and it would be my honor that you upvote my answer if it helped you to solve your problem
4

It turns out that I had NVIDIA CodeWorks installed. I believe it was part of my VS2017 installation options. I've removed it and modified my ANDROID_HOME Environment Variable and removed all of the variables associated with the NVPACK folder. (thanks to everyone (1) who helped me offsite!)

All good!

Comments

2

You have to set ANDROID_HOME variable to SDK. create a new variable by the name and set it to the installation directory. make sure SDK is not below 2 subfolders from c drive or any windows root drive.

Comments

1

Open Android Studio.

Click on Tools go to Sdk manager.

Then click on SDK tools.

enter image description here

Unchecked Hide Obsolete Packages then Check Android SDK Tools.

Then Tools will be install after that you can set the path and check the connectivity. Your problem will resolve.

Comments

1

For Mac Users use:

flutter config --android-sdk /Users/<your-user>/Library/Android/sdk

Comments

0

Go into C:\Users\asus\AppData\Local\Android\sdk, double cliclk on sdk mannager.exe and update all packages.

It will take around 10 minutes to update which also depends on your internet speed.

Comments

0

You need to install the command-line tools inside Android studio, as explained here:

Flutter doctor error - Android sdkmanager tool not found. Windows

Comments

0

I have installed Flutter with Android Studio many times. And I found most of the installation errors were because of poor network connection. When I use fast internet service, Flutter Environment was set up within an hour without any issue.

Internet speed is very important while Flutter, Android Studio, and SDK installation.

Best, Ahmed I.

Comments

0

1- Activate Command-line Tools and download it as in this picture

2- Add Android SDK path to your system environment variables. this link would help you..

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.