我试图用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.

这个问题有解决办法吗?


当前回答

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

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

安装OEM USB驱动程序:

安装OEM USB驱动程序

其他回答

到目前为止,我还没有看到提到的一个选项是(对于我的设置)开发人员选项“选择USB配置”必须设置为MTP(媒体传输协议)。

设置系统环境变量:

Variable Value
ANDROID_HOME D:\Android_Sdk\Sdk (your path)

如果你在Mac上手动启动模拟器,你可以看到连接的设备,也可以从AVD管理器中启动Android模拟器。

我用Genymotion来测试应用程序。我也有同样的问题。当我按下运行按钮时,我在过去两个小时遇到了这个错误……

如何修复此错误:只需重新安装Genymotion此错误就消失了。

在iOS和Mac中,当我得到这个错误时,这为我工作:

open -a simulators
flutter run