Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>In general if you want to get output into Logcat you should use the "Log" command.</p> <p>An example:</p> <pre><code>Log.d(TAG,"OUTPUT"): </code></pre> <p>d = debug<br> TAG = a string you define, gets displayed in Logcat in the column before the "normal" output<br> OUTPUT = stuff u want to get printed </p> <blockquote> <p>Log is a logging class you can use to print out messages to the logcat. You can read messages in real time if you run logcat on DDMS (covered next). Common logging methods include: v(String, String) (verbose), d(String, String) (debug), i(String, String) (information), w(String, String) (warning) and e(String, String) (error).</p> </blockquote> <p>For further information:</p> <p><a href="http://developer.android.com/guide/developing/debug-tasks.html" rel="nofollow">http://developer.android.com/guide/developing/debug-tasks.html</a> </p> <p><strong>EDIT:</strong></p> <p>What I ment before is, in order to test some things with outputs you shouldn't use: </p> <pre><code>System.out.println("JSON stuff"); </code></pre> <p>Instead of using this you should use in your code:</p> <pre><code>// Values just as example private static void string TAG = "+++JSON+++"; ... Log.d(TAG,"JSON stuff in here"); ... </code></pre> <p>It will get displayed in Logcat. I don't exactly know why, but it't the better way. Like this you also could display an error message:</p> <pre><code>Log.e(...); </code></pre> <p>It will change the color of your output in Logcat, so you may see it better if e.g. an error occurrs.</p>
 

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