未找到 Android SDK。尝试设置 ANDROID_SDK_ROOT 环境变量

时间:2021-02-22 17:24:08

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

当我尝试编译我的应用程序时,它显示 [!] 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 新手,这是我的第一个应用程序。

1 个答案:

答案 0 :(得分:0)

这是针对 Ubuntu 的。更改 SDK 目录的路径。

export ANDROID_SDK_ROOT=/usr/lib/android-sdk

这是针对窗户的。更改 SDK 目录的路径。

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