I've been trying to setup flutter on my laptop with Android studios dolphin (using Windows 11), but I've been running into some troubles with using flutter doctor and agreeing to the android licenses. Running the flutter doctor command produces the below error message, however it still runs normally :
I ignored it and tried to run the --android-licenses command as it suggested, but the below was returned :
'git rev-parse HEAD' is not recognized as an internal or external command, operable program or batch file'
'DIR /B /O:D "C:\Users\jerry\Downloads\flutter_windows_3.3.10-stable\flutter\packages\flutter_tools\pubspec.yaml" "C:\Users\jerry\Downloads\flutter_windows_3.3.10-stable\flutter\packages\flutter_tools\pubspec.lock"' is not recognized as an internal or external command'
The error in red says 'Android sdkmanager tool was found, but failed to run (C:\Users\jerry\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat): "ProcessException: Cannot find file specified'. Apologies for the Japanese.
Any ideas on how this could be? I can still access git through the cmd, and have added the bin and cmd paths to the PATH variable in the Environmental variables already.
I have another question posted regarding details about the issue with agreeing to the android licenses here :
'Android sdkmanager tool found, but failed to run' for flutter doctor --android-licenses
and I would be beyond grateful if someone could help me with that as well.
Solutions I've attempted :
- Renaming the ComSpec from "%SystemRoot%\system32\cmd.exe;" to "C:\Windows\system32\cmd.exe" as suggested by this forum https://github.com/flutter/flutter/issues/30638
However the opposite is proposed by this thread : Flutter doctor script throws errors and then crashes which is what my ComSpec is set to now at the time of capturing this screenshot.
Checking my jdk - My JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_351
Added a FLUTTER_HOME variable, set to C:\Users\jerry\Downloads\flutter_windows_3.3.10-stable\flutter