使用 Android Studio 调试卡在“等待调试器"中永远 [英] Debugging with Android Studio stuck at "Waiting For Debugger" forever

查看:56
本文介绍了使用 Android Studio 调试卡在“等待调试器"中永远的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

更新假设重复是执行Run时卡在Waiting For Debugger"的问题,而这个问题是卡在Waiting For Debugger" 在执行Debug时,产生问题的步骤不同,解决方法也不同.

UPDATE The supposed duplicate is a question on being stucking in "Waiting For Debugger" when executing Run, while this question is on being stucking in "Waiting For Debugger" when executing Debug, the steps to produce the problem is different, and the solution(s) are different as well.

每当我尝试使用Android Studio的调试功能时,运行状态总是卡在:

Whenever I try to use Android Studio's Debug function, the Run status would always stuck at:

Launching application: com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity.
DEVICE SHELL COMMAND: am start -n "com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity" -a android.intent.action.MAIN -c android.intent.category.LAUNCHER
Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.astrotek.parashoot.debug/com.astrotek.ptpviewer.StarterActivity }

当我正在调试的设备 (Samsung Galaxy S3 Android 4.3) 会显示

While the device (Samsung Galaxy S3 Android 4.3) I'm debugging would display

从 Android Studio 0.8.8 一直到 1.0 都是如此.在同一台计算机上,我可以在同一台设备上使用 Eclipse 执行调试,没有任何问题.

This has being the case from Android Studio 0.8.8 all the way to 1.0. And on the same computer I can perform debugging using Eclipse on the same device without any issues.

那么问题是我该怎么做才能使 Android Studio 调试工作?

So the question is what can I do to make Android Studio debugging work?

更新:在运行 Android 5.0 的 Nexus 7 (2013) 上调试时会发生同样的事情;并在另一台机器上测试呈现相同的结果.我不能是唯一遇到此问题的人:-/

Update: The same thing happens when debugging on Nexus 7 (2013) running Android 5.0; and testing on another machine rendered the same result. I can't be the only one encountering this issue :-/

更新:因为这个问题很烦人,所以开启了赏金计划.即使重新安装应用程序也无法解决.Nexus 5 运行 Cyano,Win7 64.ADB 日志告诉我们:

Update: Opened a bounty since this issue is so annoying. Even re-installing the app doesn't solve. Nexus 5 running Cyano, Win7 64. The ADB log is telling:

8568-8568/it.myapp:myprocess W/ActivityThread﹕ Application it.myapp is waiting for the debugger on port 8100...
8568-8568/it.myapp:myprocess I/System.out﹕ Sending WAIT chunk

此外,我找不到在 Android Studio 中断开或重置 ADB 连接的简单方法.

Also, I can't find an easy way to disconnect nor reset ADB connection in Android Studio.

推荐答案

只需使用此命令将其禁用即可.adb shell am clear-debug-app

Just use this command to disable it. adb shell am clear-debug-app

这篇关于使用 Android Studio 调试卡在“等待调试器"中永远的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆