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
Some of the above suggestions would help sometimes but not consistently. Like many, I've suspected the USB cables but in the end I've decided that it was the USB jack on my Android device simply wearing out from so much use. I guess they're only meant to be plugged in once or twice a day to charge, and not 10 times a day 5 days a week doing development. In this case a new cable may help but there may be no good solution short of a new device.