0

我尝试使用命令提示符运行我的 android 应用程序,一旦我在命令提示符中运行 adb 状态就会挂起,并且命令提示符上会显示消息“等待设备”。每次我需要关闭模拟器并运行应用程序。这是我的 logcat 错误。请帮助我的朋友。

[2012-12-28 15:48:49 - DeviceMonitor] Adb connection Error:An existing
connection was forcibly closed by the remote host [2012-12-28 15:48:49
Unexpected error while launching logcat. Try reselecting the device.] An existing connection was forcibly closed by the remote host
java.io.IOException: An existing connection was forcibly closed by the
remote host     at sun.nio.ch.SocketDispatcher.read0(Native Method)     at
sun.nio.ch.SocketDispatcher.read(Unknown Source)    at
sun.nio.ch.IOUtil.readIntoNativeBuffer(Unknown Source)  at
sun.nio.ch.IOUtil.read(Unknown Source)  at
sun.nio.ch.SocketChannelImpl.read(Unknown Source)   at
com.android.ddmlib.AdbHelper.executeRemoteCommand(AdbHelper.java:395)
    at com.android.ddmlib.Device.executeShellCommand(Device.java:462)   at
com.android.ddmuilib.logcat.LogCatReceiver$1.run(LogCatReceiver.java:110)
    at java.lang.Thread.run(Unknown Source)

[2012-12-28 15:48:50 - DeviceMonitor] Connection attempts: 1
4

1 回答 1

1

您只需转到 DDMS 即可执行此操作,并且有一个重置 adb 选项,如下图所示。亚行

您可以从命令提示符手动重新启动 adb

运行=>cmd=>path_android_sdk=>平台工具>

然后编写以下命令。

adb kill-server - To kill the server forcefully

adb start-server - To start the server
c:\android-sdk-windows latest\platform-tools>adb kill-server

c:\android-sdk-windows latest\platform-tools>

adb start-server

守护进程没有运行。现在在端口 5037 上启动它

守护进程成功启动

于 2012-12-28T10:47:36.303 回答