英文:
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 <path-to-your-android-sdk>
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论