Since I've upgraded Android Studio to 2.0, I have been not able to debug. It hangs with "waiting for the debugger to attach" on the screen. Do you have any idea why this is happening?
Asked
Active
Viewed 3,397 times
2
-
What's your platform? I usually try "sudo adb kill-server; sudo adb start-server" to fix it. – Francesc May 01 '16 at 06:11
-
Unfortunately, it did not help. – ozo May 01 '16 at 06:36
-
And the reason for downvoting?! – ozo May 01 '16 at 07:38
-
Yeah. Bunch of jaggons roam these places looking for anybody who they determine is beneath them because of the quality of question you ask. The fact is it's the question I have, and "common" isn't a good answer. Google needs to get its act together. So whoever downvoted is a total tool. "Hey downvoter--DO YOU KNOW HOW TO SOLVE THE PROBLEM?" I'm sorry, I didn't hear you. Oh, you only click up and down vote buttons? Click one for this: "Do you still get jollies by down voting?" – DSlomer64 Sep 20 '17 at 21:08
3 Answers
2
This is a common scenario. Restart your Android Studio and reconnect your device.
I was having the same issue, except I was running into it with the Android Emulator. I figured out that if you put your computer to sleep while Android Studio or the emulator are running, that messes up the connection between them. My problem went away after I restarted both, the emulator, and Android Studio.

capt.swag
- 10,335
- 2
- 41
- 41
-
Before your suggestion, I have upgraded it to 2.1; and with 2.1, even it went to sleep, it does not hang at debug; however I couldn't find an opportunity to test it in 2.0, and I should have restarted the AS before asking this question, therefore although I could't test your answer, I am upvoting your answer. – ozo May 01 '16 at 08:27
-
Yeah, Glad it worked for you. Didn't work for me. So since @ozo upvoted your answer for one of the dumbest reasons ever, I'm downvoting you, which I would have done anyway since that "pat" answer of restarting is almost NEVER the actual solution. – DSlomer64 Sep 20 '17 at 21:39
0
Clearing the Intellij IDEA (Android Studio) .idea directory which contains configuration information worked for me:
- Exit Android Studio
- Navigate to the project you are trying to debug
- Backup any files inside .idea that you modified (if your project checks any of these into VCS)
- Delete .idea directory
- Open the project in Android Studio

vman
- 1,264
- 11
- 20
-
-
Not sure why the downvotes, this may not work for you but has solved the issue for me and others: https://stackoverflow.com/a/41749791/880026. There are multiple causes and solutions for this issue. – vman Jun 06 '17 at 02:00
-
The reason for downvotes is that people tried your "solution" and it didn't work for them. Answer is about at the same level as "restart" whatever program contains the error. I'm not downvoting you since you said "worked for me". Whenever an answer says that, I ignore it. But I'm ticked off tonight: looking for solution and finding nothing but dumb ansewrs. – DSlomer64 Sep 20 '17 at 21:42