Reputation: 1281
I'm struggling a bit with Logcat. The phone disconnects from LogCat with the message "Device Disconnected" every time I push a button changing intents in my program.
What can cause this? And Why? Could it be my code throwing a error disconnecting LogCat? Or is this a LogCat issue?
I'v tried to restart eclipse, and stop the adb.exe process with no luck.
: E/(): Device disconnected
Upvotes: 15
Views: 23585
Reputation: 7220
Just Type This Command In Terminal
adb devices
u should see this log:
List of devices attached
adb server version (40) doesn't match this client (36); killing...
* daemon started successfully *
FA57NY900383 device
And Run Again, Your application starts to run on your device
Upvotes: 1
Reputation: 1762
I had this same problem where it kept saying "Device Disconnected" when I could clearly hit Debug and select my phone, but for some reason I was expecting the LogCat to already be going.
But it will not be going if the phone is locked (facepalm).. After unlocking it seems fine.
Hope this helps someone else that doesn't realize their phone is locked when trying to debug / use LogCat.
Upvotes: 0
Reputation: 24005
This is a real problem in Eclipse DDMS. If you run adb logcat
at the same time that Eclipse shows "device disconnected" you will most likely still see logcat output (this is what happens in my case). Only real explanation I can see is that DDMS has a bug.
My solution? Switch to IntelliJ. It doesn't have the same problem, or any similar problems that Eclipse DDMS has connecting to devices which are recognized by adb.
Upvotes: 3
Reputation: 10425
I restarted
my device
, closed eclipse
, used a command prompt
opened at android-sdk/platform-tools
to run adb kill-server
, reopened eclipse
, and then used that same command prompt
to run adb logcat
.
My problem was then fixed, though I'm not sure which step fixed it.
Upvotes: 1
Reputation: 6919
Here is commented a solution that works for me, Clear Log:
LogCat Stops Running in Eclipse Needs Restart
Upvotes: 1
Reputation: 2452
There may be some sync problem in DDMS. Just restart the eclipse it will work fine.
Upvotes: 14
Reputation: 1281
So I resolved the issue. I'm not sure what part did the trick, but I noticed javaw.exe was running on the computer even though eclipse was closed. So I forced closed this one, unfortunately I also re-installed my Jelly Bean ROM. So I'm not sure what exactly did the trick. I bet it was the phone though.
Upvotes: 0