Reputation: 69
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?
Upvotes: 6
Views: 20669
Reputation: 31
You can kill ADB from the Window Task manager but I advice you kill the ADB process tree. By right clicking on the adb on the Task manager and then click on END Process TREE. That worked for me and I believe it will help you to solve the problem. But make sure you have your AVD recognised. To do this click window--AVD Manager--click on the AVD you want to use to highlight it, then click on the START tab--The launch options opens up. Click on Wipe user data and then click on LAUNCH. That will help you launch your identified AVD before you go ahead to kill Adb process tree as I described earlier. That did the magic for me. After doing this try running the program. If you get an error like "Activity not working", don't panic. It's not an error but it's just there to tell you that you are running your program again without any change or update on the code. You can just click the backward button on your emulator and then run again and you won't see that error again.
Upvotes: 3
Reputation: 21
Go to run-> configuration->Target->select Avd -> Run it. It solved my problem which made me crazy
Upvotes: 2
Reputation: 1750
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.
Upvotes: 4
Reputation: 4713
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:
--- OR ---
This should work.
--- OR ---
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!
Upvotes: 9
Reputation: 2460
Go to the Device view and on the upper right corner there is a down arrow, click there an later on reset adb..after a few seconds try to re-run the app,it should work.
Upvotes: 1