1

when I open eclipse and all files are loaded and I run my app, the emulator opens after which I get an error in console.

So Again when I close the emulator and run the app again, I get the same error in console.

And finally the third time when I run the app, it gets installed and launches the apk. This happens every time I open eclipse.

What is the problem?

Console logs:

        [2013-06-01 20:10:58 - CalendarDemo] ------------------------------
   [2013-06-01 20:10:58 - CalendarDemo] Android Launch!
[2013-06-01 20:10:58 - CalendarDemo] adb is running normally.
[2013-06-01 20:10:59 - CalendarDemo] Performing com.indianic.demo.calendark.CalendarActivity activity launch

 [2013-06-01 20:10:59 - CalendarDemo] Automatic Target Mode: Preferred AVD '53' is not available. Launching new emulator.
      [2013-06-01 20:10:59 - CalendarDemo] Launching a new emulator with Virtual Device '53'
[2013-06-01 20:11:29 - Emulator] Failed to create Context 0x3005
 [2013-06-01 20:11:29 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
[2013-06-01 20:11:30 - Emulator] emulator: emulator window was out of view and was recentered
 [2013-06-01 20:11:30 - Emulator] 
  [2013-06-01 20:11:30 - CalendarDemo] New emulator found: emulator-5554
    [2013-06-01 20:11:30 - CalendarDemo] Waiting for HOME ('android.process.acore') to be launched...
  [2013-06-01 20:12:46 - CalendarDemo] emulator-5554 disconnected! Cancelling 'com.indianic.demo.calendark.CalendarActivity activity launch'!
     [2013-06-01 20:19:55 - CalendarDemo] ------------------------------
      [2013-06-01 20:19:55 - CalendarDemo] Android Launch!
      [2013-06-01 20:19:55 - CalendarDemo] adb is running normally.
         [2013-06-01 20:19:55 - CalendarDemo] Performing com.indianic.demo.calendark.CalendarActivity activity launch
   [2013-06-01 20:19:55 - CalendarDemo] Automatic Target Mode: Preferred AVD '53' is not available. Launching new emulator.
    [2013-06-01 20:19:55 - CalendarDemo] Launching a new emulator with Virtual Device '53'
     [2013-06-01 20:20:20 - Emulator] Failed to create Context 0x3005
   [2013-06-01 20:20:20 - Emulator] emulator: WARNING: Could not initialize OpenglES emulation, using software renderer.
  [2013-06-01 20:20:21 - Emulator] emulator: emulator window was out of view and was recentered

    [2013-06-01 20:20:21 - Emulator] 
[2013-06-01 20:20:21 - CalendarDemo] New emulator found: emulator-5554
[2013-06-01 20:20:21 - CalendarDemo] Waiting for HOME ('android.process.acore') to be launched...
     [2013-06-01 20:21:14 - CalendarDemo] HOME is up on device 'emulator-5554'
 [2013-06-01 20:21:14 - CalendarDemo] Uploading CalendarDemo.apk onto device 'emulator-5554'
[2013-06-01 20:21:16 - CalendarDemo] Installing CalendarDemo.apk...
[2013-06-01 20:22:18 - CalendarDemo] Success!
Daahrien
  • 10,190
  • 6
  • 39
  • 71
Metalhead1247
  • 1,978
  • 1
  • 17
  • 28
  • 1
    you might want to [follow this thread][1] it contain the same error [1]: http://stackoverflow.com/questions/15652311/emulator-emulator-window-was-out-of-view-and-was-recentered – user1549804 Jun 01 '13 at 17:20
  • @user1549804 comment to the answer there say changing ram size does not stop the warnings – Metalhead1247 Jun 01 '13 at 17:26
  • The warning is a known issue - Issue [47829](https://code.google.com/p/android/issues/detail?id=47829). Instead of closing and re-opening the emulator, when eclipse reports emulator disconnection, restarting adb might help to deploy the app on the same emulator. – Rajesh Jun 01 '13 at 17:54
  • @Rajesh how to restart adb.? – Metalhead1247 Jun 01 '13 at 17:58
  • Go to DDMS perspective, click the dropdown in the right most of the "Devices" tab, select "Reset adb" – Rajesh Jun 01 '13 at 18:02

2 Answers2

1

Try this

First of all, start your desired emulator and then do following steps,

Step 1: Right click on your project -> Run As -> Run Configurations

Step 2: There will be 3 tabs, Android | Target | Common , click on Target

Step 3: In Deployment Target Selection Mode, select the first option which is Always prompt to pick device

Step 4: Click on Apply and then click on Run

As the result, you will get list of currently available devices, you can select desired device and can run the app on it.

I hope it will be helpful !!

Mehul Joisar
  • 15,348
  • 6
  • 48
  • 57
0

Go to window->Preferences->Android->DDMS.

change value of adb timeout to 10000.

Since it takes a lot of time for emulator to start, adb times out and the connection is lost
hence the app is not installed.

Metalhead1247
  • 1,978
  • 1
  • 17
  • 28