关于Flutter安装的错误问题

huangapple go评论72阅读模式
英文:

Suffering error regarding flutter installation

问题

C:\Users>flutter doctor

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-IN)
[X] Android toolchain - develop for Android devices
X 无法找到 Android SDK。
从以下链接安装 Android Studio:https://developer.android.com/studio/index.html
首次启动时,它将帮助您安装 Android SDK 组件。
(或者访问 https://flutter.dev/setup/#android-setup 获取详细说明)。
如果 Android SDK 已安装到自定义位置,请将 ANDROID_HOME 设置为该位置。
您可能还希望将其添加到 PATH 环境变量中。

[√] Android Studio (版本 3.5)
[!] 已连接的设备
! 没有可用设备

! 在 2 个类别中发现问题。

英文:
C:\Users\>flutter doctor

    Doctor summary (to see all details, run flutter doctor -v):
    [√] Flutter (Channel stable, v1.12.13+hotfix.5, on Microsoft Windows [Version 10.0.18362.535], locale en-IN)
    [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.dev/setup/#android-setup for detailed instructions).
          If the 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.
    
    [√] Android Studio (version 3.5)
    [!] Connected device
        ! No devices available
    
    ! Doctor found issues in 2 categories.

答案1

得分: 1

问题是Flutter无法找到Android SDK。
可能是因为ANDROID_HOME变量未在您的PATH中设置。

在Windows上SDK的默认路径是:
C:\Users\{USERNAME}\AppData\Local\Android\Sdk

尝试使用以下命令配置Flutter:

flutter config --android-sdk <path-to-your-android-sdk>
英文:

The problem is that Flutter cannot find the Android SDK.
Probably because the ANDROID_HOME variable is not set in your PATH.

The default path to the SDK on Windows is:
C:\Users\{USERNAME}\AppData\Local\Android\Sdk

Try to configure Flutter with the following command:

flutter config --android-sdk &lt;path-to-your-android-sdk&gt;

huangapple
  • 本文由 发表于 2020年1月7日 00:57:33
  • 转载请务必保留本文链接:https://go.coder-hub.com/59616068.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定