Try next:
- Go to your
AppData\Local\Android\Sdk
folder - Search for
sdkmanager.bat
- Navigate to its location and copy it
- Open
SetupAndroid.bat
with Notepad (or other editor of your choice) - Find the line(s) which contains
sdkmanager.bat
- Paste the copied location (for example
\cmdline-tools\latest\bin\sdkmanager.bat
) - Save, exit, and run the edited file
This worked for me.