Run an app on a multiple devices automatically in Android Studio

I have two Android devices connected to my computer. When I try to run the app from Android Studio, then it always prompt me to choose the device. Is there any way to deploy the app on a multiple devices automatically - by clicking Run or even better with a shortcut?


Solution 1:

This is almost too easy, actually. When you see the list of devices come up after launching the app, just shift or control click each device you want it to launch on. Just discovered this by accident. Hope it helps.

Solution 2:

For new users, in Android Studio 2, you also need to disable "Instant Run" in Settings->Build, Execution, Deployment->Instant Run. See Instant Run.

With Instant Run, you only can work with one device at time.

UPDATE

In Android Studio 2.1, it is automatically disabled when run in multiples devices at time.

Deploying to multiple devices

Instant Run uses different techniques to perform hot, warm, and cold swaps that are specific to the API level of the target device. For this reason, while deploying an app to multiple devices at once, Android Studio temporarily turns off Instant Run.

Solution 3:

I got new update of Android Studio that is Android Studio 3.5

Android Studio 3.5
Build #AI-191.8026.42.35.5791312, built on August 9, 2019
JRE: 1.8.0_202-release-1483-b03 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Windows Server 2016 10.0

In this update they have added in-built option to run application on multiple devices.

The IDE has a new drop-down menu that lets you quickly select which device you'd like to deploy your app to. This menu also includes a new option that lets you run your app on multiple devices at once.

enter image description here

Do update new version of Android Studio and Enjoy.