There's no support in ant right now to indicate which emulator or
device to use. The ant command really is just a wrapper around the
appropriate adb command line so just use adb -s ... if you have
special needs.

R/

On Thu, Apr 16, 2009 at 8:56 AM, David Turner <[email protected]> wrote:
>
>
> On Thu, Apr 16, 2009 at 5:25 PM, a druid <[email protected]> wrote:
>>
>> Hi,
>>
>> What I understood.
>>
>> I have to create two avds
>>
>> I did this with
>> android create -avd --name d1 --target 2 --sdcard 1024M --skin HVGA
>> android create -avd --name d2 --target 2 --sdcard 1024M --skin HVG
>>
>> What I don't know:
>>
>> How to start two emulators:
>> ------------------------------------------
>> emulator '@d1' &
>> works fine
>>
>> emulator '@d2' &
>> complains with
>> "could not bind server socket address 127.0.0.1:15555: Address already
>> in use"
>
> Actually, this is just a warning message that should really not be displayed
> normally
> (i.e. it's a minor bug that the message is displayed here). It just means
> that the second
> emulator will use port 5556 as its console number (while the first one will
> use 5554)
>
>>
>> Both emulators consume seem to start up though.
>> What features won't work for the second emulator.
>> Do I have to manually specify a port or is there some automatic
>> option?
>
> No, ignore the message, everything should work correctly in each emulator.
>
>>
>> How to upload an application to one platform:
>> --------------------------------------------------------------------
>
>
> adb -s emulator-5554 install <package> to upload to the first emulator
> adb -s emulator-5556 install <package> to upload to the second one
>
> the "-s <serial>" option is used by adb to target a given device by its
> "serial number"
> for emulators, the serial number is 'emulator-<port>', where <port> is the
> console
> control port that is also displayed in the emulator's window title.
>
>>
>> How to install to  d1 / d2:
>> ------------------------------------
>>
>> When creating a project I am only asked for the target, but not for
>> the device so I assume it must be a run time ant switch.
>>
>> ant debug
>> will compile my project
>>
>> ant install
>> or ant reinstall
>>
>>
>> complains with the error message 'more than one device and emulator'
>> So I guess, that there is a way to specify the target device.
>>
>> ant help
>> does not reveal anything useful
>>
>
> Ant is a very complex beast :-) I don't know how one can specify a target
> emulator from the command-line. There should be a way because the ADT plugin
> does this properly and invokes Ant internally. Sorry, I can't help you right
> now
> but will try to have a look at it.
>
>>
>>
>>
>>
>>
>
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Android Discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/android-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to