无法附加的Andr​​oid Studio的调试器的A​​ndr​​oid程序 [英] Can't attach Android Studio's debugger to Android process

查看:279
本文介绍了无法附加的Andr​​oid Studio的调试器的A​​ndr​​oid程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不能附加机器人工作室的调试器,我可调试应用程序。任何人有这个问题?基本上,我不能让我的应用程序列在选择处理对话框。

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模式端口:通过运行 ADB TCPIP 5555 ,然后连接到它与<$ C 5555 $ C> ADB连接192.168.1.87
  • 等待更多&安培; 重新启动的时候得到这个错误说法亚行没有响应。你可以等待更多的,或者手动杀亚行进程,然后单击重新启动亚行 错误: DDMS: $ ANDROID_HOME /平台工具/ ADB,启动服务器的失败 - 如果有必要 错误手动运行截图
  • Restarting MacBook
  • Restarting devices: tried with Samsung Galaxy Note II N7100 (4.3) and Samsung Galaxy S4 (4.4.2)
  • Reenabling Settings->Developer Options on the devices
  • Reenabling Settings->Developer Options->USB debugging on the devices
  • Restarting adb by running adb kill-server and adb 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 running adb tcpip 5555 and then connecting to it with adb connect 192.168.1.87
  • Waiting more&Restart when got this error saying ADB 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

更新:

这设备多次出现在的Andr​​oid 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设备(使成功连接确保设备)
  • 确保的Andr​​oid DDMS 设备| logcat的显示您的应用程序和只有一台设备被列
  • 检查所有程序复选框。 见截图
  • Kill all adb processes (use ps -x | grep adb and kill -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

这篇关于无法附加的Andr​​oid Studio的调试器的A​​ndr​​oid程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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