Flutter Unable to locate Android SDK.

[√] Flutter (Channel stable, v1.2.1, on Microsoft Windows [Version 10.0.14393], locale zh-CN)
[X] Android toolchain - develop for Android devices
    X Unable to locate Android SDK.
      Install Android Studio from: https://developer.android.com/studio/index.html
      On first launch it will assist you in installing the Android SDK components.
      (or visit https://flutter.io/setup/#android-setup for detailed instructions).
      If Android SDK has been installed to a custom location, set ANDROID_HOME to that location.
      You may also want to add it to your PATH environment variable.

Flutter Unable to locate Android SDK._第1张图片

解决办法

提示找不到Android SDK?然后说如果安装在一个自定义的路径,要设置ANDROID_HOME,ok 那就加上

桌面右键 我的电脑>属性>高级系统设置>环境变量>在用户变量中新建ANDROID_HOME,变量值就是Android SDK路径

Flutter Unable to locate Android SDK._第2张图片

设置好之后重启电脑即可。


Flutter 环境配置


你可能感兴趣的:(Flutter)