Sunday, October 24, 2010

android build on device and emulator

`ant install` will freak out and die if you have more then one device in `adb devices`

but it has an option in its rules called adb.device.arg, which is not really an adb device arg, but more like an adb arg. so you can pass any argument to adb there.

in my case since i only have one emulator and one device simply passing "-d" for device or "-e" for emulator solves it. you can also pass "-s id_of_device_or_emulator"

since i'm clueless to ant i will use the easiest solution and pass that as an argument every single time:

ant install -Dadb.device.arg="-d"


if you are clever than me, pls comment on how i create a simple `ant installdevice` rule that simply sets that var and then run the install target, please.

No comments:

Post a Comment