You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After running go get -d golang.org/x/mobile/example/basic, tried gomobile install golang.org/x/mobile/example/basicwhile multiple devices are connected at the same time.
$ gomobile install golang.org/x/mobile/example/basic
error: more than one device/emulator
- waiting for device -
error: more than one device/emulator
- waiting for device -
error: more than one device/emulator
- waiting for device -
error: more than one device/emulator
- waiting for device -
error: more than one device/emulator
- waiting for device -
(these two lines appear indefinitely...)
What did you expect to see?
I expected that there would be a command line flag for specifying a device serial number in gomobile install. For example, providing an optional -s <serial number> flag as in adb would be sufficient:
We are experimenting with some multi-device mobile apps (i.e. same app running on multiple devices simultaneously) built with gomobile, and this limitation of gomobile install command significantly slows down our implement/test cycle.
What did you see instead?
gomobile install expects that there is only a single device connected. The command runs indefinitely until there is only one active device.
The text was updated successfully, but these errors were encountered:
This was on my radar before I got busy with other things, though I was only looking at adb -d and adb -e flags for one-off convenience.
As I understand it, right now gomobile install only deals with android, but that may not be the case in the future given the implicit -target=android? In that case, polluting the accepted args with adb specific flags seems not great.
@yyoon your actual use case should be addressable without any change using the env var ANDROID_SERIAL. For example, I just tested this and it works ok while also having a hardware device connected:
ANDROID_SERIAL=emulator-5554 gomobile install
As far as slowing down the build/test cycle, it looks like gomobile install always performs a build so you'd actually want to do something like
Please answer these questions before submitting your issue. Thanks!
go version
)?go env
)?After running
go get -d golang.org/x/mobile/example/basic
, triedgomobile install golang.org/x/mobile/example/basic
while multiple devices are connected at the same time.I expected that there would be a command line flag for specifying a device serial number in
gomobile install
. For example, providing an optional-s <serial number>
flag as inadb
would be sufficient:Please see: http://developer.android.com/tools/help/adb.html#directingcommands
We are experimenting with some multi-device mobile apps (i.e. same app running on multiple devices simultaneously) built with gomobile, and this limitation of
gomobile install
command significantly slows down our implement/test cycle.gomobile install
expects that there is only a single device connected. The command runs indefinitely until there is only one active device.The text was updated successfully, but these errors were encountered: