Last Updated: February 25, 2016
· passy

Deploy an APK with Ant when multiple devices are attached

[exec] error: more than one device and emulator
[exec] - waiting for device -

If this looks familiar, this tip might be useful for you. First, find the device you want to deploy to by running adb devices and copy the name, e. g. emulator-5554.

To deploy to just this device, add the -Dadb.device.arg="-s emulator-5554" parameter to your ant call, e. g.

ant -Dadb.device.arg="-s emulator-5554" installd