eclipse eclipse中的“远程主机强行关闭了现有连接”

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/17556011/
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-09-19 20:51:57  来源:igfitidea点击:

"An existing connection was forcibly closed by the remote host" in eclipse

androideclipse

提问by user2565795

I've been using Eclipse to build Android applications, and have been testing them on my HTC One X. I had the drivers installed from HTC Sync, and Eclipse is up-to-date. Recently, this connection simply stopped working. The computer (running Windows 8 Pro 64-bit) detects the One X, and I can view the files on it from my computer. However, Eclipse does not see the phone when I go to run the application, and whenever I plug in my phone with Eclipse running, I get this error:

我一直在使用 Eclipse 构建 Android 应用程序,并一直在我的 HTC One X 上测试它们。我从 HTC Sync 安装了驱动程序,并且 Eclipse 是最新的。最近,此连接停止工作。计算机(运行 Windows 8 Pro 64 位)检测到 One X,我可以从我的计算机上查看其上的文件。但是,当我运行应用程序时 Eclipse 看不到手机,每当我在 Eclipse 运行的情况下插入手机时,我都会收到此错误:

[2013-07-09 14:47:43 - DeviceMonitor] Adb connection Error:An existing connection was forcibly closed by the remote host
[2013-07-09 14:48:15 - DeviceMonitor] Connection attempts: 1

Furthermore, the HTC sync manager tells me that my phone is locked and that it cannot retrieve information from it, despite the fact that the phone is unlocked. I have tried to reset ADB, and that did not work. Debugging is enabled on the phone. How would I go about fixing this error?

此外,HTC 同步管理器告诉我我的手机被锁定并且无法从中检索信息,尽管手机已解锁。我试图重置亚行,但没有奏效。在电话上启用调试。我将如何解决此错误?

Thanks

谢谢

采纳答案by Peri Hartman

Check to see if you have two versions of adb installed. Eclipse installs one and perhaps HTC Sync installed another. They might be different versions. You'll have to do some path trickery to get both apps to use the same version of adb.

检查您是否安装了两个版本的 adb。Eclipse 安装了一个,也许 HTC Sync 安装了另一个。它们可能是不同的版本。您必须做一些路径技巧才能让两个应用程序使用相同版本的 adb。

You can search for ADB in your path by entering the following in a command prompt:

您可以通过在命令提示符中输入以下内容来搜索路径中的 ADB:

where adb.exe

回答by Lalit kumar

i do very sample solution for this just delete .android folder and close android studio and restart android studio

我为此做了非常示例的解决方案,只需删除 .android 文件夹并关闭 android studio 并重新启动 android studio