当前位置: 首页 > 知识库问答 >
问题:

"找不到Android SDK。"在windows 10上运行flutter doctor时

皇甫波峻
2023-03-14

目前我的Andoid工作室在外景

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.

2

3.

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>

Android SDK找不到颤振在这个que有一个答案运行

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.

正如在相同的 Que ans 中建议的那样,但上面给出了这个(我知道我的路径包含空格......我试图将我的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”...它需要空间....请帮助我。

请帮助和感谢社区!!

共有1个答案

晏弘雅
2023-03-14

如果路径名有空格,您可以用双引号括住路径。这允许Windows将路径标识为单个字符串:"C:\用户\aditya jain\下载\Android\androidStudio"

 类似资料:
  • 我的项目是一个多模块分级项目,使用Scala。 测试类位于src/Test/scala/xxx/xxxx/xxx/xxxx/xxxxx/xxxxx下,每次尝试从IDE运行时,都会得到相同的错误: 测试类不是什么花哨的,简单的jUnit测试:

  • 我想在Windows10中的gpu上运行我的代码,就像GoogleColab一样,我们可以改变运行时选项,这很容易转换到gpu。是否有可能在windows中对jupyter笔记本进行同样的操作。

  • 我从GitHub下载了这段代码,看看是否可以对其进行定制,使其适用于我正在进行的项目。我希望这是我的最后一期,但我完全被这个错误所困住了。我可以构建和运行应用程序,但它在启动时崩溃。 我在这里经历了许多类似的问题,我根据解决方案做出了修改,但它们似乎对我不起作用。我是这方面的新手,如果有任何帮助,我将不胜感激。拜托...任何人。:) 这是我的错误输出-

  • 版本: > geckodriver 0.26.0(路径内环境变量) 硒3.141.0 火狐75.0 python 3.8.2 Windows 10 当我尝试: 我明白了: 当我尝试时: 我明白了: IEDriver适用于IE 我有Windows Visual Studio安装https://github.com/mozilla/geckodriver/releases指示我应该。 我能做些什么来实

  • 问题内容: 我在本地计算机上使用创建了一个新的Rails项目,但是当我尝试启动服务器时,我得到了:找不到JavaScript运行时。请参阅以获取可用运行时列表。() 注意:这与Heroku无关。 问题答案: 安装诸如nodejs之类的javascript运行时库可以解决此问题 要在ubuntu上安装nodejs,可以在终端中键入以下命令: 要在使用yum的系统上安装nodejs,请在终端中键入以下

  • 我在Mac上使用了蝗虫1.4.2,当我使用时,我得到了这个错误