简体   繁体   中英

Flutter, Linux doesn't show up as device

I followed the steps here at flutter.dev . It didn't work. Linux is not showing when I run flutter devices . I'm running Linux Mint 19.3. This is the output from flutter doctor

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:

git checkout master && flutter doctor

after this you will see the linux on flutter devices

This is what worked for me:

Select the "dev" channel like this:

flutter channel dev

Then upgrade flutter:

flutter upgrade

Then enable the linux desktop option again:

flutter config --enable-linux-desktop

flutter devices

Then you should see output like below:

Downloading package sky_engine...
5.6s Downloading flutter_patched_sdk tools... 25.9s Downloading flutter_patched_sdk_product tools...
8.8s Downloading linux-x64 tools... 8.1s Downloading linux-x64/font-subset tools...
7.1s 1 connected device:

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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