报错
当运行Flutter Doctor时发现如下报错
[✗] Android toolchain – develop for Android devices
✗ cmdline-tools component is missing
Run `path/to/sdkmanager –install “cmdline-tools;latest”`
See https://developer.android.com/studio/command-line for more details.
可以看到提示SDK的cmdline-tools未安装,按理说去Android Studio的设置中安装即可,但安装后仍报错,原因是我改过一次SDK的路径,将默认路径改到了D盘中。
解决办法
改变Flutter Config设置,“告诉”Flutter新的SDK路径
flutter config –android-sdk “D:\Document\AndroidSdk“
将Flutter Config中的Android SDK路径改为自己的即可
😊