Android Development on Eclipse: Always opens new emulator
<p>This should be a really simple one.  I am doing the Hello Android tutorial and I was able to get my app to install into the emulator.  However, when I go to run again (with no changes) the eclipse environment insists on launching a new emulator instead of connecting to the existing one.  How do I fix that?  My development environment is a Mac Mini running Mac OS 10.6.8.</p>

<p>Thanks.  </p>

<p>New Update:</p>

<p>I have found the answer:</p>

<p>First I read this [question linked above by Mangusto][1]
<a href="http://stackoverflow.com/questions/8136268/use-same-android-emulator-everytime/8136352#8136352">Use same android emulator everytime</a></p>

<p>Then I realized that what one really needs to do, if the emulator is opening and initializing slowly, is to start the emulator, wait for it to initialize, and then attach to it the manual way described in the link above.  Automatic does not work if your emulator is starting slowly as it disconnects as I described in the update below.</p>

<p>Thanks for the responses.</p>

<p>Update:</p>

<p>Below is the print out from eclipse (I tried to link image but could not due to my user level.  I need reputation level of 10 or more).  I had already tried the suggestion below about automatic vs manual.  I think the issue is that while the apk file was installed it did not automatically launch in the emulator.  Therefore, eclipse disconnected from the emulator.  I was able to see my application by navigating to the apps within the android emulator.<br>
[2011-11-24 08:25:34 - SDK Manager] Created AVD 'myAvd' based on Android 4.0, ARM (armeabi-v7a) processor, <BR>
[2011-11-24 08:25:34 - SDK Manager] with the following hardware config:<BR>
[2011-11-24 08:25:34 - SDK Manager] hw.lcd.density=240v<BR>
[2011-11-24 08:25:34 - SDK Manager] vm.heapSize=24<BR>
[2011-11-24 08:25:34 - SDK Manager] hw.ramSize=512<BR>
[2011-11-24 08:29:17 - HelloAndroid] ------------------------------<BR>
[2011-11-24 08:29:17 - HelloAndroid] Android Launch!<BR>
[2011-11-24 08:29:17 - HelloAndroid] adb is running normally.<BR>
[2011-11-24 08:29:17 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch<BR>
[2011-11-24 08:29:17 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'myAvd'<BR>
[2011-11-24 08:29:17 - HelloAndroid] Launching a new emulator with Virtual Device 'myAvd'<BR>
[2011-11-24 08:29:25 - Emulator] 2011-11-24 08:29:25.377 emulator-arm[984:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.<BR>
[2011-11-24 08:29:25 - HelloAndroid] New emulator found: emulator-5554<BR>
[2011-11-24 08:29:25 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...<BR>
[2011-11-24 08:31:29 - HelloAndroid] HOME is up on device 'emulator-5554'<BR>
[2011-11-24 08:31:29 - HelloAndroid] Uploading HelloAndroid.apk onto device 'emulator-5554'<BR>
[2011-11-24 08:31:29 - HelloAndroid] Installing HelloAndroid.apk...<BR>
[2011-11-24 08:33:36 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554!<BR>
[2011-11-24 08:33:36 - HelloAndroid] (null)<BR>
[2011-11-24 08:33:36 - HelloAndroid] Failed to install HelloAndroid.apk on device 'emulator-5554': Connection reset by peer<BR>
[2011-11-24 08:33:36 - HelloAndroid] com.android.ddmlib.InstallException: Connection reset by peer<BR>
[2011-11-24 08:33:36 - HelloAndroid] Launch canceled!<BR>
[2011-11-24 08:34:55 - HelloAndroid] ------------------------------<BR>
[2011-11-24 08:34:55 - HelloAndroid] Android Launch!<BR>
[2011-11-24 08:34:55 - HelloAndroid] adb is running normally.<BR>
[2011-11-24 08:34:55 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch<BR>
[2011-11-24 08:34:55 - HelloAndroid] Automatic Target Mode: launching new emulator with compatible AVD 'myAvd'<BR>
[2011-11-24 08:34:55 - HelloAndroid] Launching a new emulator with Virtual Device 'myAvd'<BR>
[2011-11-24 08:35:03 - Emulator] WARNING: Data partition already in use. Changes will not persist!
[2011-11-24 08:35:05 - Emulator] WARNING: Cache partition already in use. Changes will not persist!
[2011-11-24 08:35:06 - Emulator] 2011-11-24 08:35:06.756 emulator-arm[1004:80b] Warning once: This application, or a library it uses, is using NSQuickDrawView, which has been deprecated. Apps should cease use of QuickDraw and move to Quartz.<BR>
[2011-11-24 08:35:06 - HelloAndroid] New emulator found: emulator-5556<BR>
[2011-11-24 08:35:06 - HelloAndroid] Waiting for HOME ('android.process.acore') to be launched...<BR>
[2011-11-24 08:35:11 - HelloAndroid] emulator-5556 disconnected! Cancelling 'com.example.helloandroid.HelloAndroid activity launch'!<BR>
[2011-11-24 08:42:36 - HelloAndroid] ------------------------------<BR>
[2011-11-24 08:42:36 - HelloAndroid] Android Launch!<BR>
[2011-11-24 08:42:36 - HelloAndroid] adb is running normally.<BR>
[2011-11-24 08:42:36 - HelloAndroid] Performing com.example.helloandroid.HelloAndroid activity launch<BR>
[2011-11-24 08:42:36 - HelloAndroid] Automatic Target Mode: Preferred AVD 'myAvd' is not available. Launching new emulator.<BR>
[2011-11-24 08:42:36 - HelloAndroid] Launching a new emulator with Virtual Device 'myAvd'<BR></p>
