错误“与 adb 的连接已关闭”当运行 Android 应用程序时
我是 Android 开发新手,在安装所有最新平台时遇到问题。我是一名java开发人员,我想学习android。
我已经在 Windows XP SP3 中成功安装了所有程序(JDK 1.6,创建了环境变量,Eclipse 3.5、3.6 和 3.7 配置良好,Android SDK 具有所有功能、设备、平台工具、APi 等,以及 ADT 插件 12对于带有 API 8 -Target 2.2- 模拟器的 Eclipse,但是,当我在 Eclipse 中运行 Android 项目时(运行-> Android 应用程序),eclipse 控制台显示:“与 adb 的连接已关闭,并且发生了严重错误...您必须重新启动 adb 和 eclipse...确保 adb 位于此路径中 ' D:\Android\android-sdk-windows\platform-tools\adb.exe'”(或类似的东西)。
我非常确定路径是正确的,adb 在命令行上正确运行,并且命令“adb Kill-server”和“adb start-server”工作正常,但不能解决我的问题(就像我一样)已阅读其他答案)。
通过 Eclipse 的模拟器无法正常工作,但是如果我通过 Eclipse ADV Manager 启动模拟器,模拟器会正常启动,但是当我运行 Android 应用程序时,会出现相同的错误。
我认为 Eclipse 无法启动 adb,但我不知道为什么。
其他问题,当我执行“adb devices”时,控制台显示一个空列表,没有“无设备”消息,但是当我插入 HTC 时,adb 在控制台中运行良好,但 Eclipse 却不能。
此外,我还尝试使用 Eclipse -“设备”选项卡重新启动 adb,但设备列表也是空的。
任何人都可以帮助我吗?我读了太多书,眼睛都变得像素化了。 xD
最诚挚的问候!
PD:抱歉,但我的英语有点差;)
I'm new with android development, and I have problems installing all the recent platform. I'm a java developer that I would like learning android.
I've installed all programs succesfully in windows xp sp3 (JDK 1.6 with environment vars created, eclipse 3.5, 3.6 & 3.7 well configured, Android SDK with all the features, devices, platform-tools, APi's, etc, and ADT Plugin 12 for eclipse with an emulator to API 8 -Target 2.2-), but, when I'm running an android project into eclipse (Run -> Android Application), the eclipse console show me: "The connection to adb is down, and a severe error has ocurred... You must restart adb and eclipse... Ensure that adb is in this path 'D:\Android\android-sdk-windows\platform-tools\adb.exe'" (or something similiar).
I'm very sure that the path is right, adb is correctly running on command-line, and the commands 'adb kill-server' and 'adb start-server' works fine, but doesn't solve my problem (like I've read in other answers).
The emulator, via Eclipse, not working, but if I start the emulator via Eclipse ADV Manager, emulator starts fine, but when I runs the android app, I take the same error.
I suppose that Eclipse can't start adb,but I don't know why.
Other issue, when I executed 'adb devices', console show me an empty list, no 'no devices' message, but when I plugged my HTC, adb is running fine in console, but Eclipse doesn't.
In addition, I also try restarting adb with Eclipse - Devices tab, but the list of devices are empty too.
Anyone can help me, please? I've read so much that my eyes are pixelated. xD
Best regards!!
PD: sorry, but my english is a bit poor ;)
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(7)
在 DDMS 透视图中(如果没有显示,请通过单击 window>open Perspective>other...>DDMS 添加)
然后单击设备选项卡的三角形>重置亚行。
这对我有用。
in the DDMS perspective (if it doesn't show, add it by click window>open perspective>other...>DDMS)
then click the triangle of the devices tab > reset adb.
this works for me.
我终于解决了问题,请参阅我的 blog
您可以按照以下步骤解决问题:
检查进程的路径:
-如果路径类似于“Programs\android-sdk\platform-tools”,则表示运行该进程的是android sdk。
-如果没有,则说明有另一个进程正在运行adb.exe,您必须杀死运行adb.exe的进程或服务。(您可以通过路径识别该进程)
I finally resolved the problem, please see my blog
you can do this steps to solve the problem:
check the path of the process:
-if the path is like "Programs\android-sdk\platform-tools", which means it is the android sdk that is running this process.
-if not, that means there is another process this is running adb.exe, you have to kill the process or service which runs adb.exe.(you can identify the process by the path)
我也遇到过这个问题。我找到的解决方案是杀死 Eclipse,打开任务管理器并杀死 adb.exe 进程。然后,当您再次启动 Eclipse 时,也应该启动 adb 并且它应该从那里开始工作。
I've had this problem too. The solution I've found is to kill eclipse, open up task manager and kill the adb.exe process. Then when you start eclipse again, that should also kick start adb and it should work from there.
尝试以下步骤:
希望这可以帮助您:)
Try the following steps :
Hope this may help you :)
就我而言,在Windows7中
然后转到命令提示符,转到平板工具并键入
然后通过 eclipse 运行您的应用程序。
这对我来说效果很好。
In my case, in Windows7
Then go to command prompt go to plate-form tools and type
Then run your application through eclipse.
It worked fine for me.
你试试
打开任务管理器>流程> eclipse.exe >结束处理>重新启动日食
you try
Open Task Manager > Processes > eclipse.exe > End Process > restart eclipse
就我而言,问题是防火墙!关闭 Windows 防火墙,然后从任务管理器重新启动 adb 和 eclipse
In my case the problem was the FIREWALL!.Turn off your windows firewall , Then restart adb and eclipse from task-manager