14

I am using vscode and I installed the flutter plugins, Dart plugins and etc but still, I cannot find my device as well as I Found the issues as follows

[flutter] flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.7.8+hotfix.3, on Microsoft Windows 
[Version 10.0.18362.239], 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/setup/#android-setup for detailed instructions).
  If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
  You may also want to add it to your PATH environment variable.

[!] Android Studio (not installed)
[√] VS Code (version 1.36.1)
[!] Connected device
! No devices available

! Doctor found issues in 3 categories.
Cœur
  • 37,241
  • 25
  • 195
  • 267
Harsh Hariya
  • 177
  • 1
  • 2
  • 12

4 Answers4

16

You need to install Android Studio in order to get Android SDK. After you use Android Studio to get the Android SDK, you can continue use VScode for flutter development.

Hope this answer helps!

AxissXs
  • 121
  • 9
guanwen yan
  • 356
  • 2
  • 10
13

You are going to need the Android SDK to be able to develop Android apps. If you don't want to install Android Studio, then you have to use the command line tools. https://developer.android.com/studio#downloads

If you are comfortable using the command line then you can do that. https://developer.android.com/studio/command-line

F-1
  • 2,887
  • 20
  • 28
  • This seems to match what I find in https://medium.com/@aubykhan/setting-up-flutter-without-android-studio-6f7abdeb353c and https://github.com/flutter/flutter/issues/9747, though both the post and issue date from 2017. Also corroborated by a mid-2019 answer on https://www.quora.com/Is-Android-Studio-necessary-for-flutter/answer/Ewald-Horn. – natevw Jan 08 '20 at 01:14
6

You don't specifically need Android Studio, all you need is the Android SDK, download it and set the environment variable to the SDK path for the flutter installation to recognise that.

You can refer this medium article: https://medium.com/@sadabwasim/flutter-in-linux-37d32890745b

Aditya Grover
  • 511
  • 6
  • 6
0

First issue, you can see the x mark in flutter doctor log:

[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/setup/#android-setup for detailed instructions).
  If the Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
  You may also want to add it to your PATH environment variable.

it means that you didn't have the Android SDK or you didn't setup the path for Android SDK yet.

Second issue,

! No devices available

it means that you haven't installed the device driver or your OS can't recognize the device.

Last,

Is it necessary to install Android Studio for flutter or what can be replacement for android studio?

It's not a necessary to install Android Studio. But I think you need to either using IntelliJ or Android studio instead of VS Code. It's because InteliJ or Android Studio have more capability as a Full-fledged IDE than VS Code which is only an editor.

ישו אוהב אותך
  • 28,609
  • 11
  • 78
  • 96