I\'m a total noob at Android programming, and wanted to learn how to debug my apps. I can\'t seem to have my Log.i|d|v calls displayed in the LogCat.
Here\'s the
After upgrade to Android 3.6.1, I have experienced this issue multiple times. The only thing that works in my case is RESTARTING THE DEVICE.
I needed to restart the adb service with the command adb usb
Prior to this I was getting all logging and able to debug, but wasn't getting my own log lines (yes, I was getting system logging associated with my application).
For eclipse: 1) Go to ddms perspective. 2) Make sure that correct device is selected. 3) If already selected and not displaying logs, then restart ABD. * Hope this will solve.
In my case I just had to add a name to the String. In first instance I just had a space in between the brackets
private static final String TAG = " ";
but after adding a name it worked perfectly.
private static final String TAG = "oncreate";
I'm a newb as well to Android-Eclipse. Here's what it took for me to get LogCat messages to display in Eclipse: 1: add this to the class in which the logcat message is called: private static final String TAG = "MyActivity"; (per the documentation here)
2: add this Log.i(TAG, "inLayout - finished"); when you where you want to display a message
If the above doesn't work, then shutdonw Eclipse and restart it and rerun your project.
It should then work.
When using Eclipse, in the DDMS perspective, make sure the correct device (propably emulator-xxxx) is selected and highlighted. Only then will you get the logcat output in the logcat view.
Also, the Android plugin is a bit quircky, and sometimes only shows the last line in the logcat view. If this happens, try to clear the log. After that, you should get all the log entries again (works for me anyway).