Flutter显示一些错误。

20 浏览
0 Comments

Flutter显示一些错误。

我正在尝试将我的Flutter应用程序连接到我的手机上,但它不起作用...

我在终端中输入了flutter doctor,它显示了一些错误:

    [!] Android toolchain - develop for Android devices (Android SDK version 32.1.0-rc1)
    X cmdline-tools component is missing
      Run `path/to/sdkmanager --install "cmdline-tools;latest"`
      See https://developer.android.com/studio/command-line for more details.
    X Android license status unknown.
      Run `flutter doctor --android-licenses` to accept the SDK licenses.
      See https://flutter.dev/docs/get-started/install/windows#android-setup for more details.
[√] Chrome - develop for the web
[X] Visual Studio - develop for Windows
    X Visual Studio not installed; this is necessary for Windows development.
      Download at https://visualstudio.microsoft.com/downloads/.
      Please install the "Desktop development with C++" workload, including all of its default components

我正在使用VS Code(如果这有所影响)。

SDK管理器的路径是什么?

为什么它告诉我“Visual Studio未安装”,而我在VS Code终端中写了那个呢?


感谢大家!

admin 更改状态以发布 2023年5月24日
0
0 Comments

Visual Studio可以正常工作,但是首先需要安装Android Studio,打开Android Studio,打开SDK Manager,从SDK工具中安装Android SDK版本32.1.0-rc1,然后打开CMD(命令提示符)运行flutter doctor --android-licenses,按下Enter键,然后输入y enter y enter...,然后写flutter doctor并查看运行问题解决。谢谢。

enter image description here

0