无法附加的Android Studio的调试器的Android程序 [英] Can't attach Android Studio's debugger to Android process
问题描述
我不能附加机器人工作室的调试器,我可调试应用程序。任何人有这个问题?基本上,我不能让我的应用程序列在选择处理
对话框。
I can't attach Android Studio's debugger to my debuggable application process. Anyone else had this issue? Basically I can't get my app listed in Choose Process
dialog.
我选择连接调试到Android的过程
:
然后,这里是如何从Android的工作室工艺选择
对话框如下:
And then, here's how Process selection
dialog from Android Studio looks like:
为什么我的应用程序没有在选择过程表现出任何的想法
列表?
Any ideas why my app is not shown in the Choose Process
list?
虽然, DDMS
看到我的应用程序的设备| logcat的
清单:
Although, DDMS
sees my app in Devices | logcat
list:
Android的显示器
也看到了的应用设备
清单:
我已经试过以下操作:
- 重新启动
的MacBook
- 重新启动设备:试图与
三星Galaxy Note II N7100
(4.3)和三星Galaxy S4
(4.4.2 ) - 重新启用
设置 - >开发人员选项
的设备 - 重新启用
设置 - >开发者选项 - > USB调试
的设备 - 重新启动
亚洲开发银行
运行ADB杀死服务器
和亚行启动服务器
- 从的MacBook重新连接设备和/或插入到另一个USB端口
- 在的MacBook启动Genymotion虚拟设备
-
重新启动TCP模式端口:通过运行
$ C> ADB连接192.168.1.87ADB TCPIP 5555
,然后连接到它与<$ C 5555 -
等待更多
&安培;重新启动
的时候得到这个错误说法亚行没有响应。你可以等待更多的,或者手动杀亚行进程,然后单击重新启动亚行
错误:
DDMS: $ ANDROID_HOME /平台工具/ ADB,启动服务器的失败 - 如果有必要
错误手动运行截图
- Restarting
MacBook
- Restarting devices: tried with
Samsung Galaxy Note II N7100
(4.3) andSamsung Galaxy S4
(4.4.2) - Reenabling
Settings->Developer Options
on the devices - Reenabling
Settings->Developer Options->USB debugging
on the devices - Restarting
adb
by runningadb kill-server
andadb start-server
- Reconnecting device from macbook and/or plugging to another USB port
- Launching Genymotion virtual device on macbook
restarting in TCP mode port: 5555
by runningadb tcpip 5555
and then connecting to it withadb connect 192.168.1.87
Waiting more
&Restart
when got this error sayingADB not responding. You can wait more, or kill "adb" process manually and click 'Restart'
Errors in ADB:
ddms: '$ANDROID_HOME/platform-tools/adb,start-server' failed -- run manually if necessary
Error screenshot
更新:
这设备多次出现在的Android DDMS
我已经注意到是 - > 设备| logcat的
列表。如果我从列表中选择第一个装置,它表明,有无调试的应用程序
,但我选择最后一台设备(4截图),我看到我调试的应用程序。查看截图:第一和的 4 。虽然,即使有只1设备列表中,并显示可调试设备和应用程序,过程仍然没有出现在选择处理
对话框。
What I've noticed is that device appears multiple times in the Android DDMS
->Devices | logcat
list. If I choose 1st device from the list, it shows, there's No debuggable applications
, but I select last device (4th in the screenshot) I see my debuggable application. See screenshots: 1st and 4th. Although, even there's only 1 device in the list and showing debuggable device and application, process still does not appear in the Choose Process
dialog.
推荐答案
所以最后我得到了它的工作,方法是:
So finally I got it working, by:
Checking 'Show all processes' checkbox!
但作为你的问题看,复选框是在开头,所以有多个问题。
BUT as you see in the question, checkbox was on at the beginning, so there were multiple issues.
要总结,这些都是做其他动作:
To summarize, these are other actions to be done:
- 杀死所有的
亚洲开发银行
处理(使用PS -x | grep的亚行
和杀 - 9进程id]
) -
亚行启动服务器
端子 - 重新连接设备
-
ADB设备
(使成功连接确保设备) - 确保
的Android DDMS
设备| logcat的
显示您的应用程序和只有一台设备被列。 - 检查
所有程序
复选框。 见截图
- Kill all
adb
processes (useps -x | grep adb
andkill -9 [process id]
) adb start-server
in terminal- Reconnect device
adb device
(to make sure device is connected successfully)- Make sure
Android DDMS
Devices | logcat
shows your app and only one device is listed. - Check
Show all processes
checkbox. See screenshot
这篇关于无法附加的Android Studio的调试器的Android程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!