Can't Attach Android Studio's Debugger To Android Process
Answer :
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:
- Kill all
adbprocesses (useps -x | grep adbandkill -9 [process id]) adb start-serverin terminal- Reconnect device
adb devices(to make sure device is connected successfully)- Make sure
Android DDMSDevices | logcatshows your app and only one device is listed. - Check
Show all processescheckbox. See screenshot
I solved this way
a. Closed Android Studio
b. Did adb kill-server from a terminal. Also check the adb process in also killed from the Running processes window in PC
c. Started Android Studio
d. Android Studio tried to initialize adb again and back to work.
It could be because the release build variant (which you can set in the Build-Variants section) has been chosen mistakenly, only debug-variant is debuggable.
Hope this can be helpful to some friends.
Comments
Post a Comment