Is there a way to print to the console in an Android app?

Anton picture Anton · Jun 23, 2010 · Viewed 55.7k times · Source

Can I run an Android app through the emulator and make it print strings to my computer's console? By console I mean the standard place you would expect to see a System.out.println() in a normal java application. So if you ran the java application from the command prompt then you will see the println()s in the command prompt or if you ran the program in eclipse you will see it in the Console tab at the bottom.

Answer

Mathias Conradt picture Mathias Conradt · Jun 23, 2010

Use Log.d("YourTag", "YourOutput");

see http://developer.android.com/reference/android/util/Log.html