flutterdartsystem32

flutter doctor shows errors, that I don't seem to able to fix. Problems: System32, Android toolchain, Windows 10 sdk



screenshot

I changed the variables in various ways, restarted this and that and I just cannot fix the issue, so what am I missing here?

The path variable always worked and now that I have deleted Visual Studio and Windows 10 SDK and re-downloaded it, everything seems to run out of control.

Here is the output of my 3 problems:



[  +33 ms] [☠] Flutter (the doctor check crashed)
[   +1 ms]     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: Cannot find the executable for `where`. This can happen if the System32 folder (e.g. C:\Windows\System32 ) is removed from the PATH environmentvariable.
                 Ensure that this is present and then try again after restarting the terminal and/or IDE.
[  +28 ms] [!] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[        ]     • Android SDK at C:\Users\Tina\AppData\Local\Android\sdk
[        ]     X cmdline-tools component is missing
[        ]       Run `path/to/sdkmanager --install "cmdline-tools;latest"`
[        ]       See https://developer.android.com/studio/command-line for more details.
[        ]     X Android license status unknown.
[        ]       Run `flutter doctor --android-licenses` to accept the SDK licenses.
[        ]       See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[   +1 ms] [!] Visual Studio - develop Windows apps (Visual Studio Community 2022 17.8.5)
[        ]     • Visual Studio at C:\Program Files\Microsoft Visual Studio\2022\Community
[        ]     • Visual Studio Community 2022 version 17.8.34511.84
[        ]     ! Unable to locate a Windows 10 SDK. If building fails, install the Windows 10 SDK in Visual Studio.

Solution

  • Open SDK manager in Android studio and check Android SDK Command-line Tools

    enter image description here

    And for Android licenses run this command in your terminal.

    flutter doctor --android-licenses

    Answer reference