Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

emulator-5554 disconnected! Cancelling 'com.example.merhaba.Main activity launch'!

Tags:

android

I started to write android app with eclipse IDE. But when I run the app I am taking emulator-5554 disconnected! Cancelling 'com.example.merhaba.Main activity launch'! error. What can I do?

like image 705
emre celenk Avatar asked Mar 05 '13 11:03

emre celenk


2 Answers

The problem as I discovered lays in the fact the the project has no appropriate Virtual Device defined for it in the AVD manager.

So the recommended steps in eclipse are:

  1. Go to "Project"-> Properties-> Android.
  2. On the right pane see what line is checked in the Project build target.
    Remember the target platform number that appears in the selected line.
  3. Go to "Windows"-> AVD Manager.
  4. Check the list of existing Android Virtual Devices for a device that matches the Platform and API level that you have set for your project (see step #2 above).
  5. If there is no line that includes an AVD for your platform (as I suspect), add it using the "New" button.
  6. A "Create New Android Virtual Device" window will be opened. set a new device name. in the "Target" selection box choose the right platform for your project.

--- OR ---

  1. Open Android Virtual Device Manager
  2. select the AVD you use for your app.
  3. Press the start button and wait for a new form to show up called (Launch Options).
  4. Check the box "Wipe user data" and hit "Launch" button.

This should work.

--- OR ---

  1. Open Android Virtual Device Manager
  2. Delete the AVD you use for your app.
  3. Create an new AVD.
  4. Start you new AVD.

This should also work.

-- OR --

try this.. go to DDMS perspective-->select Device-->go to Window-->Navigation-->Show view menu-->reset adb.. .

Enjoy your emulator once again!

like image 112
Sathish Avatar answered Sep 22 '22 15:09

Sathish


This solved it for me:

1) Leave Eclipse open and the emulator also open even though Eclipse doesn't find it.

2) In command line type:

adb kill-server

Then when prompt comes back, type

adb start-server

3) After adb starts again, try to run your project again from Eclipse.

like image 24
Vero Avatar answered Sep 26 '22 15:09

Vero