Android Studio 未找到Android SDK,请尝试设置ANDROID_SDK_ROOT环境变量

628mspwn  于 2022-11-16  发布在  Android
关注(0)|答案(3)|浏览(1101)

当我尝试编译应用程序时,显示为[!] 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代码,但在termux和我的新Flutter,这是我的第一个应用程序。

hyrbngr7

hyrbngr71#

在系统变量下设置ANDROID_SDK_ROOT变量,设置系统变量后还需要重启android studio。
例如。

ANDROID_SDK_ROOT = "C:\Android\SDK"
mmvthczy

mmvthczy2#

这适用于Ubuntu。请将路径更改为SDK目录。

export ANDROID_SDK_ROOT=/usr/lib/android-sdk

这适用于Windows。请将路径更改为SDK目录。

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

yftpprvb3#

这适用于Windows。请将路径更改为SDK目录。
在窗口上
设置ANDROID_SDK_ROOT=“C:\安装位置\android-sdk”
在Linux上导出ANDROID_SDK_ROOT=/usr/lib/android-sdk

相关问题