Note that there are some explanatory texts on larger screens.

plurals
  1. POBasics on using logcat in Android development
    primarykey
    data
    text
    <p>I am just starting Android and I don't understand how to use this <strong>logcat</strong> thing.</p> <p>I am working on the emulator but will probably be working on a real device in the future as well. One of the programs that was testing (<a href="https://stackoverflow.com/questions/18183978/android-program-hangs-before-oncreate-is-called-beginner">SEE HERE</a>) hangs up when it starts and other users suggested I look at the logcat. But the logcat in my computer keeps on displaying new text and scrolling up. I am not sure how to look for anything in all that mess. Sometimes it keeps scrolling when I am not even testing my program.</p> <p>Does it show things if I do anything at all in the emulator? The emulator is already so slow that it's hard to figure out which event on the emulator is causing which message. </p> <p>Also, for a beginner, what level of verbosity is enough on the logcat? Going to assert doesn't show anything (which is probably logical as I don't have assertions enabled) and so I assumed Error was probably the least verbose mode, but even then the log has too many messages to handle. </p> <p>What is the minimum verbosity level that I need to set it to, and is there any sample program out there that lets me test what kind of event in the code produces what kind if message in the logcat? (I am using logcat in the IDE)</p> <p>--- EDIT --- </p> <p>I see that the logcat has messages such as these </p> <pre><code>08-12 08:24:26.699: I/Choreographer(528): Skipped 57 frames! The application may be doing too much work on its main thread. 08-12 08:25:02.550: I/Choreographer(528): Skipped 33 frames! The application may be doing too much work on its main thread. 08-12 08:25:07.950: I/Choreographer(528): Skipped 37 frames! The application may be doing too much work on its main thread. 08-12 08:25:08.022: E/SoundPool(287): error loading /system/media/audio/ui/Effect_Tick.ogg 08-12 08:25:08.022: W/AudioService(287): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg 08-12 08:25:08.022: E/SoundPool(287): error loading /system/media/audio/ui/Effect_Tick.ogg 08-12 08:25:08.022: W/AudioService(287): Soundpool could not load file: /system/media/audio/ui/Effect_Tick.ogg </code></pre> <p>This is in the Info mode, and the verbose mode has even more incomprehensible text so I didn't include it. It looks like it cannot find the file containing the sound effect to be played when the back button is pressed, which it is displaying on the log. How do I remove such unnecessary messages related to the phones OS user interface and only display messages related to the program I am testing and what's causing it to hang up before even onCreate() is called in the code? I want to be able to do this from the IDE for now.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload