How to fix Flutter doctor error at Android Studio

1,062

Accordingly to https://github.com/flutter/flutter/issues/83195 it should be possible to solve the issue by setting the path to Android Studio.

I could solve the issue with flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"

Share:
1,062
DerBoki
Author by

DerBoki

Updated on December 30, 2022

Comments

  • DerBoki
    DerBoki over 1 year

    I am trying to fix error from the flutter doctor -v command and i have no idea what the error is now.

    It recognizes Android Studio and even though the flutter and dart plugins are installed, it says they can be installed. Is it not finding them? The message is highlighted green, so i guess it doesn't matter too much. But in the next part it says flutter doctor check crashed and gives a path error for a weirdly formatted android studio plugins path? I set the android studio path with "flutter config --android-studio-dir [/path/to/android/studio]" and the sdk with "flutter config --android-sdk /path/to/android/sdk" and apparently it recognized android studio. What exactly is its problem here?

    Thanks in advance to everyone trying to help!

    Here is part of the terminal output:

    [√] Android Studio (version 4.1.0)
        • Android Studio at D:\Android\Android Studio
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
        • Java version OpenJDK Runtime Environment (build 11.0.8+10-b944.6842174)
    
    [☠] Android Studio (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 FileSystemException: Exists failed, path = 'D:\Android\Android Studio" .plugins' (OS Error: Die Syntax für den Dateinamen, Verzeichnisnamen oder die Datenträgerbezeichnung ist
          falsch.
          , errno = 123)
        • #0      _Directory.existsSync (dart:io/directory_impl.dart:94:7)
          #1      ForwardingFileSystemEntity.existsSync (package:file/src/forwarding/forwarding_file_system_entity.dart:43:33)
          #2      ErrorHandlingDirectory.existsSync.<anonymous closure> (package:flutter_tools/src/base/error_handling_io.dart:479:22)
          #3      _runSync (package:flutter_tools/src/base/error_handling_io.dart:573:14)
          #4      ErrorHandlingDirectory.existsSync (package:flutter_tools/src/base/error_handling_io.dart:478:12)
          #5      AndroidStudio.pluginsPath (package:flutter_tools/src/android/android_studio.dart:186:52)
          #6      AndroidStudioValidator.validate (package:flutter_tools/src/android/android_studio_validator.dart:46:17)
          #7      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:111:32)
          #8      asyncGuard.<anonymous closure> (package:flutter_tools/src/base/async_guard.dart:109:18)
          #9      _rootRun (dart:async/zone.dart:1354:13)
          #10     _CustomZone.run (dart:async/zone.dart:1258:19)
          #11     _runZoned (dart:async/zone.dart:1789:10)
          #12     runZonedGuarded (dart:async/zone.dart:1777:12)
          #13     runZoned (dart:async/zone.dart:1708:12)
          #14     asyncGuard (package:flutter_tools/src/base/async_guard.dart:109:3)
          #15     Doctor.startValidatorTasks (package:flutter_tools/src/doctor.dart:199:9)
          #16     Doctor.diagnose (package:flutter_tools/src/doctor.dart:303:47)
          #17     DoctorCommand.runCommand (package:flutter_tools/src/commands/doctor.dart:50:47)
          #18     FlutterCommand.verifyThenRunCommand (package:flutter_tools/src/runner/flutter_command.dart:1192:12)
          <asynchronous suspension>
          #19     FlutterCommand.run.<anonymous closure> (package:flutter_tools/src/runner/flutter_command.dart:1043:27)
          <asynchronous suspension>
          #20     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
          <asynchronous suspension>
          #21     CommandRunner.runCommand (package:args/command_runner.dart:196:13)
          <asynchronous suspension>
          #22     FlutterCommandRunner.runCommand.<anonymous closure> (package:flutter_tools/src/runner/flutter_command_runner.dart:284:9)
          <asynchronous suspension>
          #23     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
          <asynchronous suspension>
          #24     FlutterCommandRunner.runCommand (package:flutter_tools/src/runner/flutter_command_runner.dart:232:5)
          <asynchronous suspension>
          #25     run.<anonymous closure>.<anonymous closure> (package:flutter_tools/runner.dart:62:9)
          <asynchronous suspension>
          #26     AppContext.run.<anonymous closure> (package:flutter_tools/src/base/context.dart:150:19)
          <asynchronous suspension>
          #27     main (package:flutter_tools/executable.dart:91:3)
          <asynchronous suspension>
    
    
    [√] IntelliJ IDEA Ultimate Edition (version 2020.2)
        • IntelliJ at C:\Users\Marcel\AppData\Local\JetBrains\Toolbox\apps\IDEA-U\ch-0\202.6397.94
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
    
    [√] IntelliJ IDEA Ultimate Edition (version 2020.3)
        • IntelliJ at G:\JetBrains\IntelliJ IDEA 2020.3
        • Flutter plugin can be installed from:
           https://plugins.jetbrains.com/plugin/9212-flutter
        • Dart plugin can be installed from:
           https://plugins.jetbrains.com/plugin/6351-dart
    
    • Yaxit
      Yaxit over 2 years
      I had the same issue, solved with following github.com/flutter/flutter/issues/83195 and running this command (the catch was in the double quotes for me) flutter config --android-studio-dir="C:\Program Files\Android\Android Studio"