我试图用Flutter创建一个示例应用程序(新安装)。还安装了Android Studio(新安装)。

这是颤振运行的输出

flutter run
No connected devices.

颤振医生输出:

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel beta, v0.1.5, on Linux, locale en_US.UTF-8)
[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
[✓] Android Studio (version 3.0)
[!] VS Code (version 1.20.1)
[!] Connected devices
! No devices available

! Doctor found issues in 2 categories.

这个问题有解决办法吗?


当前回答

检查ADB是否运行。如果不是,执行以下命令:

adb start server

然后

adb devices

如果您的计算机中没有安装ADB,请重新安装并运行命令。

其他回答

这对我来说很管用:

>开发人员选项>关闭USB调试开关>重新打开USB调试开关

步骤1:执行命令:flutter devices检查已连接设备

步骤2:如果在可用模拟器列表中没有任何连接的设备,请运行:flutter emulators

步骤3:要运行模拟器,请运行:flutter emulators——launch <模拟器id>

步骤4:如果没有可用的模拟器,运行:flutter emulators——create[——name xyz]

==>

步骤1:要查看模拟器列表,运行:emulator -list-avds

步骤2:现在要启动模拟器,运行:emulator -avd avd_name

==>

步骤1:打开-a模拟器

步骤2:扑动运行(在您的应用程序目录中)

应该至少连接一个设备/模拟器来运行Flutter应用程序。

还要确保在开发人员设置中启用了USB调试。

在将“ANDROID_HOME”更改为环境变量并将其设置为Android SDK的位置后,我解决了这个问题…在我的情况下C:\Android\Sdk。

有时问题出在设备连接及其驱动程序上。

如果你已经打开了开发人员选项和USB调试,但仍然无法连接你的设备,你必须尝试这个,因为它来自谷歌。

安装OEM USB驱动程序:

安装OEM USB驱动程序