flutter - “无法找到 Android SDK。”在 Windows 10 上运行颤振医生时
问题描述
目前我的安卓工作室在位置
C:\Android\AndroidStudio
在控制台上
C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], 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/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[√] Android Studio
[√] Connected device (2 available)
! Doctor found issues in 1 category.
我的 SDK 位置是
C:\Users\aditya jain\AppData\Local\Android\Sdk
1>我已经安装了Android sdk平台工具和Android sdk工具(废弃)
2>我只有一个本地、Loacallow 和漫游文件,但没有平台文件,因为我看过很多 youtube 视频..他们说要添加到路径平台文件,但我在用户的 appdata 文件夹中看不到任何内容(它默认隐藏)。 https://www.youtube.com/watch?v=7GuGlATHYX8&t=195s
3> 为我的 sdk 运行颤振配置命令并得到
C:\Users\aditya jain>flutter config --android-sdk flutter config --android-sdk \C:\Users\aditya jain\AppData\Local\Android\Sdk
Setting "android-sdk" value to "flutter".
You may need to restart any open editors for them to read new settings.
C:\Users\aditya jain>
在这个问题中,flutter 找不到 Android SDK, 有一个答案可以运行
flutter config --android-sdk /path/to/android/sdk
flutter config --android-studio-dir /path/to/android/studio
但我不知道我应该为我的 sdk 位置做什么..我的声誉较低,所以我不能在那里发表评论,所以我在这里发布问题
也试过
C:\Users\aditya jain>flutter config --android-sdk <sdk-"C:\Users\aditya jain\AppData\Local\Android\Sdk">
The syntax of the command is incorrect.
C:\Users\aditya jain>flutter config --android-sdk <sdk-C:\Users\aditya jain\AppData\Local\Android\Sdk>
The syntax of the command is incorrect.
正如在同一个问题中所建议的那样,但在上面给出了这个(我知道我的路径包含空格..我试图把我的 android 放在下载中,这样就不会有空格但我也得到如下错误
C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], 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/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[!] Android Studio
X android-studio-dir = C:\Android\AndroidStudio
X Android Studio not found at C:\Android\AndroidStudio
[√] Connected device (2 available)
! Doctor found issues in 2 categories.
C:\Users\aditya jain>flutter config --android-studio-dir=C:\Users\aditya jain\Downloads\Android\AndroidStudio
Setting "android-studio-dir" value to "C:\Users\aditya".
You may need to restart any open editors for them to read new settings.
C:\Users\aditya jain>flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 2.2.0, on Microsoft Windows [Version 10.0.19043.985], 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/docs/get-started/install/windows#android-setup for detailed instructions).
If the Android SDK has been installed to a custom location, please use
`flutter config --android-sdk` to update to that location.
[√] Chrome - develop for the web
[!] Android Studio
X android-studio-dir = C:\Users\aditya
X Android Studio not found at C:\Users\aditya
[√] Connected device (2 available)
! Doctor found issues in 2 categories.
C:\Users\aditya jain>
我无法将“aditya jain”文件夹重命名为“adityajain”……它需要空间……请帮助我。
请帮助并感谢社区!
解决方案
推荐阅读
- php - Laravel 刀片“@auth”指令未按预期工作
- c++ - 如何使用 C++ 结构计算环的面积和周长?
- tensorflow - 如何解析单个 TFRecord?
- php - 如何在php中将上传的文件重命名为用户名?
- python - 就运行时间和内存而言,哪种二分搜索算法更好?
- javascript - 如何将值从共享函数 VB.Net 传递到 Javascript
- assembly - 在用户模式下可以允许或禁止执行哪些指令?
- arrays - 我在使用 application.transpose 将数据导出到 excel 时遇到问题
- c - Shell 输入/输出重定向
- python - 如何修复 Selenium WebDrive 中的“NoSuchElementExecptionError”