Logcat not displaying my log calls

前端 未结 30 1714
悲&欢浪女
悲&欢浪女 2020-11-28 22:45

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

相关标签:
30条回答
  • 2020-11-28 23:42

    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.

    0 讨论(0)
  • 2020-11-28 23:43

    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).

    0 讨论(0)
  • 2020-11-28 23:43

    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.

    0 讨论(0)
  • 2020-11-28 23:43

    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";
    
    0 讨论(0)
  • 2020-11-28 23:44

    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.

    0 讨论(0)
  • 2020-11-28 23:45

    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).

    0 讨论(0)
提交回复
热议问题