简体   繁体   English

Flutter Doctor 找不到 Android SDK

[英]Flutter Doctor can't find Android SDK

I recently downloaded Android Studio 4.1 to learn how to code in dart with flutter.我最近下载了 Android Studio 4.1 来学习如何在 dart 中使用 flutter 进行编码。 the flutter doctor command generates errors, despite the fact that all android sdks are up to date.I have already installed the flutter and dart plugins on Android studio, but same problem.尽管所有 android sdks 都是最新的,但 flutter doctor 命令会生成错误。我已经在 Android studio 上安装了 flutter 和 dart 插件,但同样的问题。 I need help please.我需要帮助。 problem's image问题的图片

I solved this problem by below step,我通过以下步骤解决了这个问题,

  1. go to -> system environment -> Environment Variables -> system Variable转到 -> 系统环境 -> 环境变量 -> 系统变量

  2. create New Variable Name ANDROID_HOME and Value D:\\Androidsdk\\tools (custom android sdk path).创建新变量名称ANDROID_HOME和值D:\\Androidsdk\\tools (自定义 android sdk 路径)。

  3. concat this path D:\\Androidsdk\\platform-tools in Path variable value using ";".使用“;”将此路径D:\\Androidsdk\\platform-tools 连接Path变量值中。 (also in system Variable) (也在系统变量中)

  4. that's all, Restart the PC to apply changes and try again -- flutter Doctor.就是这样,重新启动 PC 以应用更改并重试 - flutter Doctor。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM