17

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

Laserbeak43
  • 595
  • 2
  • 8
  • 21

9 Answers9

22

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

Mohammad
  • 792
  • 1
  • 7
  • 15
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!

Laserbeak43
  • 595
  • 2
  • 8
  • 21
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.

Sushanth
  • 1,373
  • 1
  • 10
  • 15
2

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.

Ahsan Hameed
  • 43
  • 1
  • 5
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.

double-beep
  • 5,031
  • 17
  • 33
  • 41
0

For Mac Users use:

flutter config --android-sdk /Users/<your-user>/Library/Android/sdk
Jakub Kurdziel
  • 3,216
  • 2
  • 12
  • 22
0

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

Flutter doctor error - Android sdkmanager tool not found. Windows

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.

Ahmad Iqbal Bhatti
  • 707
  • 1
  • 5
  • 8
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..

A. Rokbi
  • 503
  • 2
  • 8