最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

How to Automate Flutter Device Selection on Android Studio Startup? (Android Studio) - Stack Overflow

programmeradmin4浏览0评论

Every time I start Android Studio, I have to go through the same routine:

  • Moving the mouse to the dropdown menu for Flutter Device Selection
  • Clicking on "Refresh" so that Flutter Device Selection can find the emulators
  • Selecting the emulator to start up

I feel that all of this is unnecessary work. Therefore, I looked for a way to automatically select the emulator instead of going through the same routine each time, but I couldn't find an option for that in the settings.

Do anyone have an idea about how to automate that work?

Every time I start Android Studio, I have to go through the same routine:

  • Moving the mouse to the dropdown menu for Flutter Device Selection
  • Clicking on "Refresh" so that Flutter Device Selection can find the emulators
  • Selecting the emulator to start up

I feel that all of this is unnecessary work. Therefore, I looked for a way to automatically select the emulator instead of going through the same routine each time, but I couldn't find an option for that in the settings.

Do anyone have an idea about how to automate that work?

Share Improve this question asked Feb 17 at 16:35 NaderNader 595 bronze badges 2
  • You can start emulator after starting android studio. this way it can detect and show selected. as that dropdown is meant for running devices – Hardik Mehta Commented 2 days ago
  • It says no devices detected, anyway I found a solution using command line script at startup – Nader Commented 2 days ago
Add a comment  | 

1 Answer 1

Reset to default 1

I found a solution using a script at startup of android studio.

From Settings > Startup Tasks > Add new configuration > Shell script > Choose for Execute: Script text > Script text: "flutter emulators --launch Pixel_6_Pro_API_34" > choose for Execute in the terminal > click apply or ok .

This works for me, it will force the emulator to launch on android studio startup.

You can surly change Pixel_6_Pro_API_34 to the device ID that u are using.

发布评论

评论列表(0)

  1. 暂无评论