This problem has been bugging me for ages and I can\'t seem to fix it or fully localize the source of the problem (although at times I can force it by allowing the phone to Stan
I had a similar problem. I just solved it by plugging in the cable into the usb2 port instead of usb3.
Toggle on/off for 'USB Debugging' in settings worked for me.
Make sure you don't have HTC Sync or Samsung Kies trying to steal adb connection. If you do, simply stop them when you're debugging.
I was just tinkering around at home with some development, and started noticing this behavior for the first time. After reading through the suggestions (USB plugs in particular), I got to thinking that the USB cable I had at hand is pretty wimpy looking, so I grabbed the cable I normally use for work (it's a larger diameter, dunno what that means internally), and since then everything has been working fine.
So for anyone landing here with these troubles, you might also check to make sure it isn't the USB cable.
If your platform and platform-tools path is set:
Then from command prompt:
adb kill-server
adb start-server
It will definitely solve the problem as it restarts the daemon with the specific port
I had this problem for long time and now I found solution that works good for me. In DDMS perspective there is an arrow on devices tab which has 'Reset adb' option. This action resolved my problem.