Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android LogCat device disconnected

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
like image 818
chriskvik Avatar asked Mar 02 '13 00:03

chriskvik


People also ask

Why is my Logcat not showing anything in Android?

Solution 1: Restarting your Android StudioIn your IDE Go to File > Invalidate Caches and Restart > Invalidate and Restart. This Solution will clear all the caches of Android studio IDE and restart it automatically, By the method, there are 80% change that Logcat will start work as before.

What is Logcat on my phone?

Logcat is a command-line tool that dumps a log of system messages, including stack traces when the device throws an error and messages that you have written from your app with the Log class. This page is about the command-line logcat tool, but you can also view log messages from the Logcat window in Android Studio.

How do I restart Logcat?

Solution 1: Restarting Logcat You need to press Alt + 6 twice to restart the Logcat. Restarting logcat often helps when it becomes irresponsive.


2 Answers

There may be some sync problem in DDMS. Just restart the eclipse it will work fine.

like image 134
Sniper Avatar answered Sep 19 '22 16:09

Sniper


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.

like image 43
stevebot Avatar answered Sep 16 '22 16:09

stevebot