Flutter 找不到 android sdk
周末的时候升级了windows11的系统,之后再安装flutter的时候遇到下面的问题就做了一下记录 至于如何安装flutter,我在前面的教程里也有写到,就不再阐述。这次我安装的时候用了fvm版本控制工具,
官网:
https://chocolatey.org/
powershell 管理员身份运行命令行
不会的话,先打开一个powershell 窗口 ,然后右击任务栏,选择第一个,即可进入
输入命令
点击是
接下来就是安装choco
@"%SystemRoot%\System32\WindowsPowerShell\v1.0\powershell.exe" -NoProfile -InputFormat None -ExecutionPolicy Bypass -Command "iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))" && SET "PATH=%PATH%;%ALLUSERSPROFILE%\chocolatey\bin"
Set-ExecutionPolicy Bypass -Scope Process -Force; [System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072; iex ((New-Object System.Net.WebClient).DownloadString('https://chocolatey.org/install.ps1'))
choco -v
choco upgrade chocolatey
可以安装成功
https://stackoverflow.com/questions/49175231/flutter-does-not-find-android-sdk
解决错误前的屏幕截图:-
Flutter 提供了更新 Android SDK 路径的命令:
运行
flutter config --android-sdk
flutter doctor --android-licenses
flutter doctor --android-licenses
安装命令行工具后,我们就可以开始了。下一步是接受 Android SDK 许可。因此,在您的计算机中打开 CMD 并执行以下命令。
然后此时检查
是不是成功了呢,