【问题标题】:No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable未找到 Android SDK。尝试设置 ANDROID_SDK_ROOT 环境变量
【发布时间】:2021-05-24 23:25:44
【问题描述】:

当我尝试编译我的应用程序时,它显示 [!] No Android SDK found. Try setting the ANDROID_SDK_ROOT environment variable.

但是当我运行它时显示-

Doctor summary (to see all details, run flutter
doctor -v):
[✓] Flutter (Channel master, 1.27.0-5.0.pre.94, on
    Linux, locale C.UTF-8)
[✗] Chrome - develop for the web (Cannot find
    Chrome executable at google-chrome)
    ! Cannot find Chrome. Try setting
      CHROME_EXECUTABLE to a Chrome executable.
[✗] Flutter IDE Support (No supported IDEs
    installed)
[!] Connected device
    ! No devices available

! Doctor found issues in 3 categories.

我正在使用 VS Code,但在 termux 上,我是 Flutter 的新手,这是我的第一个应用程序。

【问题讨论】:

    标签: android flutter android-studio dart visual-studio-code


    【解决方案1】:

    这是为 Ubuntu 准备的。更改 SDK 目录的路径。

    export ANDROID_SDK_ROOT=/usr/lib/android-sdk
    

    这适用于窗户。更改 SDK 目录的路径。

    set ANDROID_SDK_ROOT="C:\installation location\android-sdk"
    

    【讨论】:

      猜你喜欢
      • 2021-04-27
      • 2022-08-13
      • 2016-05-08
      • 1970-01-01
      • 1970-01-01
      • 2021-03-24
      • 2016-04-07
      • 2020-04-12
      相关资源
      最近更新 更多