作者:nora抹抹茶I | 来源:互联网 | 2023-07-13 14:21
IcantattachAndroidStudiosdebuggertomydebuggableapplicationprocess.Anyoneelsehadthis
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 Studio的调试器附加到我的调试应用程序中。还有人有这个问题吗?基本上,我无法让我的应用程序在选择过程对话框中列出。
I'm selecting Attach debugger to Android process
:
我正在选择附加调试器到Android程序:
And then, here's how Process selection
dialog from Android Studio looks like:
下面是Android Studio的过程选择对话框的样子:
Any ideas why my app is not shown in the Choose Process
list?
为什么我的应用程序没有显示在选择过程列表中?
Although, DDMS
sees my app in Devices | logcat
list:
虽然,DDMS在设备| logcat列表中看到了我的应用:
Android Monitor
also sees the app in Devices
list:
安卓显示器也可以在设备列表中看到应用程序:
I've tried these actions:
我试过这些操作:
- Restarting
MacBook
- 重新启动电脑
- Restarting devices: tried with
Samsung Galaxy Note II N7100
(4.3) and Samsung Galaxy S4
(4.4.2)
- 重启设备:试用三星Galaxy Note II N7100(4.3)和三星Galaxy S4 (4.4.2)
- Reenabling
Settings->Developer Options
on the devices
- 重新启用设置-设备上的>开发者选项。
- Reenabling
Settings->Developer Options->USB debugging
on the devices
- 重新启用设置->开发者选项->在设备上的USB调试。
- Restarting
adb
by running adb kill-server
and adb start-server
- 通过运行adb kill-server和adb启动服务器重新启动adb。
- Reconnecting device from macbook and/or plugging to another USB port
- 从macbook重新连接设备,或插入到另一个USB端口。
- Launching Genymotion virtual device on macbook
- 在macbook上启动Genymotion虚拟设备。
restarting in TCP mode port: 5555
by running adb tcpip 5555
and then connecting to it with adb connect 192.168.1.87
- 重新启动TCP模式端口:5555通过运行adb tcpip 5555,然后与adb连接,连接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
- 当出现这个错误时,等待更多的时间,表示ADB没有响应。您可以等待更多,或者手动删除adb进程,在adb中单击“重启”错误:ddms:“$ANDROID_HOME/平台工具/adb,start-server”失败——如果必要的错误截图,请手动运行。
Update:
更新:
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.
我注意到,在Android DDMS->设备| logcat列表中,设备出现了多次。如果我从列表中选择第一个设备,它显示,没有可调试的应用程序,但是我选择了最后一个设备(屏幕截图中的第4个),我看到了我的可调试应用程序。见截图:1和4。尽管在列表中只有一个设备,显示可调试的设备和应用程序,但是进程仍然没有出现在选择过程对话框中。
7 个解决方案