0

currently my andoid studio is in location

C:\Android\AndroidStudio

on console

C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-IN)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[√] Android Studio
[√] Connected device (2 available)

! Doctor found issues in 1 category.

my sdk location is

C:\Users\aditya jain\AppData\Local\Android\Sdk

1>i have installed Android sdk platform tools and Android sdk tools (obsoloete)

2>I only have a Local, Loacallow and Roaming File but not a Platforms file , as i have seen many youtube videos ..they said to add to path platform file but i can't see any in my appdata folder in users(it is hidden by default). https://www.youtube.com/watch?v=7GuGlATHYX8&t=195s

3> ran flutter config command for my sdk and got

C:\Users\aditya jain>flutter config --android-sdk flutter config --android-sdk \C:\Users\aditya jain\AppData\Local\Android\Sdk
Setting "android-sdk" value to "flutter".

You may need to restart any open editors for them to read new settings.

C:\Users\aditya jain>

Android SDK cannot be found by flutter in this que there is an answer to run

flutter config --android-sdk /path/to/android/sdk

flutter config --android-studio-dir /path/to/android/studio

but i don't know what i should for my sdk location ..i have less reputation so i can't comment there to ask there so here i am posting ques

also tried

C:\Users\aditya jain>flutter config --android-sdk <sdk-"C:\Users\aditya jain\AppData\Local\Android\Sdk">
The syntax of the command is incorrect.

C:\Users\aditya jain>flutter config --android-sdk <sdk-C:\Users\aditya jain\AppData\Local\Android\Sdk>
The syntax of the command is incorrect.

as is suggested in same que ans but getting this given above (i know my path contain spaces ..i tried to put my android in downloads so that there will be no spaces but there also i get errors as below

C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-IN)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[!] Android Studio
    X android-studio-dir = C:\Android\AndroidStudio
    X Android Studio not found at C:\Android\AndroidStudio
[√] Connected device (2 available)

! Doctor found issues in 2 categories.

C:\Users\aditya jain>flutter config --android-studio-dir=C:\Users\aditya jain\Downloads\Android\AndroidStudio
Setting "android-studio-dir" value to "C:\Users\aditya".

You may need to restart any open editors for them to read new settings.

C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], locale en-IN)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[!] Android Studio
    X android-studio-dir = C:\Users\aditya
    X Android Studio not found at C:\Users\aditya
[√] Connected device (2 available)

! Doctor found issues in 2 categories.

C:\Users\aditya jain>

i can't rename ' aditya jain' folder to 'adityajain'...it takes space....pls help mee.

please help and thanks community!!

Pros Cons
  • 1
  • 6

2 Answers2

0

If the path name has spaces, you can wrap the path with double quotes. This allows Windows to identify the path as a single String: "C:\Users\aditya jain\Downloads\Android\AndroidStudio"

Omatt
  • 8,564
  • 2
  • 42
  • 144
0

If you have already configured SDK path for Flutter (flutter config --android-sdk ) and yet not working than...

Install the platform-tools resolves the problem. Go to the SDK Manager (top-right in the toolbar), then open SDK Tools, then check-mark ✅ Android-SDK Platform-Tools and apply the changes (As shown below). For me this solution worked. Enjoy...

Check image

Kush
  • 1,080
  • 11
  • 15