Reviving this thread in case others stumble upon it. I recently added the ANDROID_SERIAL property support released in Android Gradle plugin 0.14.0 (2014/10/31).
https://code.google.com/p/android/issues/detail?id=75407 On Thursday, April 4, 2013 10:45:07 AM UTC-4, Per Christian Henden wrote: > > Hi group! > > When executing the build I have multiple devices available for adb, and > this makes the InstallTask fail with an adb error ("more than one device > and emulator"). > The reason for the multiple devices is that this happens on a build server > (Jenkins) where there are multiple Android projects building at the same > time, each using their own emulator. > To install an apk in this environment 'adb' must be given a device serial, > for example 'adb -s emulator-5554 install myapp.apk'. > > Do you have any suggestions on a workaround for this limitation in the > gradle plugin? > My ideas so far are to overwrite the InstallTask or to somehow supply the > ANDROID_SERIAL environment variable to the InstallTask. > When ANDROID_SERIAL is available, adb will use that device. > > Cheers > PC: > -- You received this message because you are subscribed to the Google Groups "adt-dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to adt-dev+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.