'Flutter not detecting sdk cmdline tools

Running flutter doctor gives me the "cmdline-tools component is missing" error, even though I installed Android SDK command-line tools in android studio, I also updated it and am sure it's the latest version. I've been searching for days for a solution to this and the only answer I can find anywhere is "Just install SDK Command-line tools in the Android studio SDK manager!" Which I clearly already did, and it still isn't working.

Images below to specify

The Flutter Doctor error

Showing I have Android SDK Command line installed



Solution 1:[1]

try updating your cmdline tools to latest version

sdkmanager.bat --update "cmdline-tools;latest"

type this command with in the cmdline-tools > bin path

or try

sdkmanager --update "cmdline-tools;latest"

this command in cmd

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1