我试图用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调试选项

其他回答

遵循以下步骤:

菜单文件->项目结构->项目SDK(在Android SDK中选择SDK路径)-> OK

确保您的设备已连接到PC。

打开Git Bash并输入:

flutter devices

然后运行你的扑动应用程序,会有用的。

Use:

flutter config --android-sdk ANDROID_SDK_PATH

Or

设备未找到(在Android Studio中设置Flutter时)

>在项目SDK中选择最新的Android API

我需要做的是:

flutter emulators

它将列出所有可用的模拟器。对于iOS系统,你需要首先打开模拟器。

flutter emulators --launch EMULATOR NAME

这将启动模拟器。

为了建造它:

flutter run -d "EMULATOR ID"

我用Flutter控制台解决了AVD问题。

步骤1:

C: \ Users \ valer> flutter emulators
6 available emulators:

3.2_QVGA_ADP2_API_22 _-_ Lollipop • 3.2in QVGA (ADP2) • Generic • 3.2 QVGA (ADP2) API 22 - Lollipop
Android_ARMv7a
Android_Accelerated_x86
Nexus S API Google Nexus S API 23
Nexus_S_API_25_1080x1920_Nougart_7.1.1_ • pixel • Google • Nexus S API 25 1080x1920 (Nougart 7.1.1)
Pixel_API_28 • pixel • Google • Pixel API 28

要运行模拟器,请运行flutter模拟器——launch <模拟器id>。

步骤2:

C: \ Users \ valer> flutter emulators --launch Pixel_API_28

MacOS解决方案:我已经浏览了所有的答案,并找到了我的解决方案。据我所知,.bas_profile, .zshrc和其他配置文件同步有一个问题。所以为了让它们从终端同步运行Android Studio,例如:

open / application /Android\ Studio\ 2.app