简体   繁体   English

Flutter、Linux 不显示为设备

[英]Flutter, Linux doesn't show up as device

I followed the steps here at flutter.dev .我按照flutter.dev的步骤进行操作。 It didn't work.它没有用。 Linux is not showing when I run flutter devices .当我运行flutter devices时,Linux 没有显示。 I'm running Linux Mint 19.3.我正在运行 Linux Mint 19.3。 This is the output from flutter doctor这是flutter doctor的 output

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.17.5, on Linux, locale en_IN)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.3)
[✓] Android Studio (version 3.6)
[!] Connected device
 ! No devices available

! Doctor found issues in 1 category.

The linux desktop development only works after the master release, go to the flutter root on terminal and run: linux 桌面开发仅在主版本发布后才能工作,go 到 flutter 终端上的 root 并运行:

git checkout master && flutter doctor

after this you will see the linux on flutter devices在此之后,您将在flutter devices上看到 linux

This is what worked for me:这对我有用:

Select the "dev" channel like this: Select “开发”通道是这样的:

flutter channel dev

Then upgrade flutter:然后升级flutter:

flutter upgrade

Then enable the linux desktop option again:然后再次启用 linux 桌面选项:

flutter config --enable-linux-desktop

flutter devices

Then you should see output like below:然后你应该看到 output 如下所示:

Downloading package sky_engine...正在下载 package sky_engine...
5.6s Downloading flutter_patched_sdk tools... 25.9s Downloading flutter_patched_sdk_product tools... 5.6s 下载flutter_patched_sdk工具... 25.9s 下载flutter_patched_sdk_product工具...
8.8s Downloading linux-x64 tools... 8.1s Downloading linux-x64/font-subset tools... 8.8s 正在下载 linux-x64 工具... 8.1s 正在下载 linux-x64/font-subset 工具...
7.1s 1 connected device: 7.1s 1个连接设备:

Linux (desktop) • linux • linux-x64 • Linux Linux(桌面) • linux • linux-x64 • Linux

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM