运行flutter run出现错误:No supported devices connected

运行flutter run出现错误:No supported devices connected

在通过flutter run启动项目的过程中,遇到提示No supported devices connected的错误,错误的意思为没有找到连接的设备

解决方案

  1. 运行flutter doctor,查看设备情况
flutter doctor
  1. 运行flutter emulators,查看可连接设备
flutter emulators
  1. 运行flutter emulators --launch <emulator id>,连接到指定设备,此时会打开一个模拟器
// mac端
flutter emulators --launch iOS Simulator
// windows
flutter emulators --launch Pixel_3a_API_30_x86
  1. 运行flutter run,启动项目,正常运行
flutter run

github查看更多文章

posted @ 2021-02-25 19:48  小菜菜爱吃菜  阅读(1891)  评论(0编辑  收藏  举报