Android 为什么我会收到 emulator-5554 断开连接的消息

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/2333273/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-20 05:27:20  来源:igfitidea点击:

Why do I get a emulator-5554 disconnected message

androidemulation

提问by saravanan

When I start my android emulator it takes some times then it will show the emulator-5554 disconnected message. Can anyone tell me what the problem is?

当我启动我的 android 模拟器需要一些时间然后它会显示 emulator-5554 断开连接的消息。谁能告诉我是什么问题?

回答by Murat

Open the Device view of Android in Eclipse IDE. Then click the Reset Adb menu item on the device menu. Then run your application again.enter image description here

在 Eclipse IDE 中打开 Android 的设备视图。然后单击设备菜单上的重置 Adb 菜单项。然后再次运行您的应用程序。在此处输入图片说明

回答by Pratik Butani

I resolved it by following these steps,

我按照以下步骤解决了它,

  • Run Emulator
  • Keep the Emulator, (no matter same error occurs)
  • Make Sure the Home Screen of Emulator is appeared
  • go to Window -> Show Perspective -> DDMS --> In Devices Panel -> on Corner Drop Down Menu
  • Reset adb
  • 运行模拟器
  • 保持模拟器,(无论发生同样的错误)
  • 确保出现模拟器的主屏幕
  • 转到窗口 -> 显示透视图 -> DDMS --> 在设备面板中 -> 在角落下拉菜单上
  • 重置亚行

I Hope it will helps you.

我希望它会帮助你。

enter image description here

在此处输入图片说明

回答by Engr M Hassan

Restart the emulator

重启模拟器

Select & Right Click on Android Project
Run Configurations
Go to tab Target 
Enable option Wipe User Data on Emulator launch parameters
Run Application

If you are using other IDE, you can restart your emulator using -wipe-data flag to delete all the temporary files that the emulator created in previous runs.

如果您使用其他 IDE,您可以使用 -wipe-data 标志重新启动模拟器以删除模拟器在之前运行中创建的所有临时文件。

回答by Androidcoder

Note that to find the "reset adb" option you have to click the downward pointing arrow next to the camera on the right of the devices view. The arrow may appear greyed out like everything else on the devices toolbar. It used to take hours sometimes for a successful emulator launch because of the constant disconnects until i discovered this option and where it was buried.

请注意,要找到“重置 adb”选项,您必须单击设备视图右侧相机旁边的向下箭头。箭头可能会像设备工具栏上的其他所有内容一样显示为灰色。过去有时需要花费数小时才能成功启动模拟器,因为在我发现此选项及其埋藏位置之前不断断开连接。

回答by Anton

I've faced the same situation today: started emulator from AVD manager, and after start it appeared offline in DDMS, resetting ADB didn't help - it attempted to start several times and resulted the same way, with offline status. Another symptom was that emulator didn't react on clicking on it. After all I realized that the reason was that emulator has saved the last execution state, which possibly crashed. To fix it I unchecked the 'Launch from snapshot' option on start of emulator. And this worked for me.

我今天遇到了同样的情况:从 AVD 管理器启动模拟器,启动后它在 DDMS 中出现离线,重置 ADB 没有帮助 - 它尝试启动几次并以相同的方式导致离线状态。另一个症状是模拟器在点击它时没有反应。毕竟我意识到原因是模拟器保存了最后的执行状态,这可能会崩溃。为了修复它,我在模拟器启动时取消选中“从快照启动”选项。这对我有用。

回答by Scuba

See Related post

见相关帖子

Another related post

另一个相关帖子

And another

而另一个

This worked on Linux for me:

这对我来说适用于 Linux:

  • Run Emulator (Wait for the home screen of the Emulator to load)
  • Click Window > Open Perspective > DDMS
  • In Devices Panel, click on drop down menu > Reset adb
  • Run project
  • 运行模拟器(等待模拟器的主屏幕加载)
  • 单击窗口 > 打开透视图 > DDMS
  • 在设备面板中,单击下拉菜单 > 重置 adb
  • 运行项目

回答by sgaleta

This happened to me, apparently another application (VideoStream in my case) was using the same port as the adb. To fix this, use the PowerShell (with elevated permissions) to look for the process that is using the port in which you get the error:

这发生在我身上,显然另一个应用程序(在我的例子中是 VideoStream)使用与 adb 相同的端口。要解决此问题,请使用 PowerShell(具有提升的权限)查找正在使用出现错误的端口的进程:

Get-Process -Id (Get-NetTCPConnection -LocalPort portNumber).OwningProcess

You will know the PID because it shows on the Id column.

您将知道 PID,因为它显示在 Id 列中。

Then open Task Manager and right click on the item bar on top (Name, Status...) and enable PID to view the process id. Then look for the PID that you got on the search before and kill it.

然后打开任务管理器,右键单击顶部的项目栏(名称,状态...)并启用PID以查看进程ID。然后查找您之前搜索的PID并杀死它。

This fixed it for me.

这为我修好了。

回答by AKM

Try running the emulator from the AVD Manager. Wait till you get the home screen and then run your project.

尝试从 AVD 管理器运行模拟器。等到你得到主屏幕,然后运行你的项目。

回答by MohanRaj S

enter image description here

在此处输入图片说明

Goto-->Prefrencess-->Android-->DDMS--> 1.visible the checkbox Use ADBHost, 2.ADB Connection timeout to 1000000, 3.Method Profile Buffer size change from 8MB into 20MB.

Goto-->Prefrencess-->Android-->DDMS--> 1.visible the checkbox Use ADBHost, 2.ADB Connection timeout to 1000000, 3.Method Profile Buffer size从8MB变成20MB。

This is Solution the Developer whom have the lower end machine will face this Problem. Kindly check it.

这是拥有低端机器的开发人员将面临此问题的解决方案。请检查一下。

回答by Pentium10

That seems to be a problem of 1.6

好像是1.6的问题

Upgrade to 2.1 and it shall disappear.

升级到2.1,它就会消失。