I've been trying to setup flutter with android studio on my laptop (Windows 11), and as I tried to agree to the android licenses the below error occured :

The first error in red says
'(C:\Users\jerry\AppData\Local\Android\Sdk\cmdline-tools\latest\bin\sdkmanager.bat): "ProcessException: Cannot find file specified'
Apologies for the Japanese.
Below are the SDK Platforms installed :




I've tried my best at scouring the internet for solutions, but any help would be much appreciated. I have made another question for the
" 'git rev-parse HEAD' is not recognized as an internal or external command"
error here : " 'git rev-parse HEAD ' is not recognized" error when flutter doctor, but still works normally? I'm not sure if the two issues are connected, but if someone can also assist me on that issue I'd be extremely grateful.
It happen to me just now on my mac, after updating all sdk manager item to the latest version. Then, I downgrade the latest (version 11) Android SDK Commmad-Line Tools to version 10.
And it solve my problem.

I also stumbled to this problem when i upgrade Android Studio Electric Eel | 2022.1.1 Patch 1 to Android Studio Electric Eel | 2022.1.1 Patch 2.
The old java_home is
C:\Program Files\Android\Android Studio\jre
The new java_home is
C:\Program Files\Android\Android Studio\jbr
After setting correct environment variable flutter doctor setup license run smothly. Hopefully it can help.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With