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
1 Answer
Reset to default 1I 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.