【问题标题】:FLUTTER DOCTOR [X] Android toolchainFLUTTER DOCTOR [X] Android 工具链
【发布时间】:2021-08-28 23:54:12
【问题描述】:

大家好,当我在控制台“Flutter doctor”上输入之前,我遇到了 android-SDK 的问题:

[√] Flutter (Channel stable, 2.2.1, on Microsoft Windows [Version 10.0.18363.1500], 
locale pl-PL)
[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/docs/get-started/install/windows#android-setup 
for detailed instructions).
      If the Android SDK has been installed to a custom location, please use
      `flutter config --android-sdk` to update to that location.

[√] Chrome - develop for the web
[√] Android Studio
[√] Connected device (1 available)

我检查了平台工具,我认为我拥有安装所需的一切

我的平台工具屏幕

enter image description here

enter image description here

我的 SDK 文件夹 enter image description here

【问题讨论】:

    标签: android flutter sdk


    【解决方案1】:

    X 无法找到 Android SDK。

    在“Windows 10的环境变量”中添加Android SDK的位置

    https://programsbuzz.com/article/how-set-android-environment-variable-path-windows-10

    【讨论】:

    • 是的,它就是这样工作的!我必须添加 path\\platform-tools 和 path\\platforms
    【解决方案2】:

    尝试运行这个命令,它对我有用。我希望这对你也有用。

    flutter doctor --android-licenses
    

    【讨论】:

    • 当我这样做时,我得到:“无法找到 Android SDK”
    猜你喜欢
    • 2020-08-07
    • 2020-06-13
    • 1970-01-01
    • 2021-01-19
    • 2021-07-19
    • 1970-01-01
    • 1970-01-01
    • 2021-09-12
    • 2021-04-30
    相关资源
    最近更新 更多