我试图使用命令提示符运行我的Android应用程序,一旦我在命令提示符下运行adb status就会挂起,并且命令提示符上显示“等待设备”消息。每次我需要关闭模拟器并运行应用程序。这是我的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
答案 0 :(得分: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开始
守护程序已成功启动