Flutter Connected device (the doctor check crashed)

Viewed 23

I have installed flutter without android studio. I run it on windows 8.1. All runs well but I had one type of error that keeps saying Connected device (the doctor check crashed). After that, I can't launch the emulator too.

Here is the error I got when run flutter doctor. Anyway, I also tried to enable and disable the hyper-v, too, but it still didn't work and there is no windows hypervisor platform.

How can I solve this issue?

[flutter] flutter doctor -v
[√] Flutter (Channel stable, 2.10.3, on Microsoft Windows [Version 6.3.9600], locale id-ID)
    • Flutter version 2.10.3 at C:\Android\flutter
    • Upstream repository https://github.com/flutter/flutter.git
    • Framework revision 7e9793dee1 (7 months ago), 2022-03-02 11:23:12 -0600
    • Engine revision bd539267b4
    • Dart version 2.16.1
    • DevTools version 2.9.2

[√] Android toolchain - develop for Android devices (Android SDK version 30.0.0)
    • Android SDK at C:\Android\sdk
    • Platform android-30, build-tools 30.0.0
    • ANDROID_HOME = C:\Android
    • ANDROID_SDK_ROOT = C:\Android\sdk\platform-tools
    • Java binary at: C:\Program Files\Eclipse Adoptium\jdk-11.0.14.101-hotspot\bin\java.exe
    • Java version OpenJDK Runtime Environment Temurin-11.0.14.1+1 (build 11.0.14.1+1)
    • All Android licenses accepted.

[√] Chrome - develop for the web
    • Chrome at C:\Program Files\Google\Chrome\Application\chrome.exe

[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

[!] Android Studio (not installed)
    • Android Studio not found; download from https://developer.android.com/studio/index.html
      (or visit https://flutter.dev/docs/get-started/install/windows#android-setup for detailed instructions).

[√] VS Code (version 1.71.2)
    • VS Code at C:\Users\pc0\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.48.0

[☠] Connected device (the doctor check crashed)
    X Due to an error, the doctor check did not complete. If the error message below is not helpful, please let us know about this issue at https://github.com/flutter/flutter/issues.
    X Exception: Unable to run "adb", check your Android SDK installation and ANDROID_SDK_ROOT environment variable: C:\Android\sdk\platform-tools\adb.exe
    • #0      throwToolExit (package:flutter_tools/src/base/common.dart:10:3)
      #1      AndroidDevices.pollingGetDevices (package:flutter_tools/src/android/android_device_discovery.dart:75:7)
      <asynchronous suspension>
      #2      PollingDeviceDiscovery._populateDevices (package:flutter_tools/src/device.dart:413:54)
      <asynchronous suspension>
      #3      Future.wait.<anonymous closure> (dart:async/future.dart:473:21)
      <asynchronous suspension>
      #4      DeviceManager.getAllConnectedDevices (package:flutter_tools/src/device.dart:170:40)
      <asynchronous suspension>
      #5      DeviceValidator.validate (package:flutter_tools/src/doctor.dart:527:34)
      <asynchronous suspension>
      #6      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:24)
      <asynchronous suspension>


[√] HTTP Host Availability
    • All required HTTP hosts are available

! Doctor found issues in 3 categories.
exit code 0
1 Answers

Although compiled Flutter apps run from Windows 7 and above the minimum system requirements for the development environment is Windows 10 or later. Developing on a machine without the minimum system requirements met could give you some undesired behaviors.

Anyway, the problem is that Android Studio is not installed. You need to install it and also the Android SDK Command-line Tools from Android Studios' preferences. Just go Preferences -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools tab and select the Android SDK Command-line Tools to be installed like the screenshot below.

enter image description here

Related