2

I'm using the Android Developer Tools on eclipse, plus Java (obviously). I'm quite new to Java, and i don't know where the output can be seen. I tried the obvious: the console, but the string wasn't there. I tried the Logcat, but the string wasn't there either.

Thanks in advance!

Jorge Guberte
  • 10,464
  • 8
  • 37
  • 56
  • 1
    possible duplicate of [Why doesn't System.out.println work? (in Java)](http://stackoverflow.com/questions/2220547/why-doesnt-system-out-println-work-in-java) – EboMike Jan 04 '11 at 09:56

5 Answers5

4

You don't use System.out.println() on Android. You use Log.v(), Log.d(), etc.

Documentation here.

EboMike
  • 76,846
  • 14
  • 164
  • 167
3

This is displayed in the Logcat. You can choose to display Logcat if you go to Windows - Show Views -> Android -> Logcat.

RoflcoptrException
  • 51,941
  • 35
  • 152
  • 200
3

If you want a visual response on the phone, use Toast.

http://developer.android.com/guide/topics/ui/notifiers/toasts.html

Jason Yeo
  • 3,602
  • 3
  • 30
  • 38
1

You can use Log.e(),Log.v(),Log.d() for displaying output or exception and you can see that in logcat.

Anand
  • 1,315
  • 1
  • 12
  • 18
1

@EboMike is right, anyway, you can see the output in the LogCat view

 Window --> Show View --> LogCat

Assumes, that you have Android's ADT plugin installed.

Herr K
  • 1,751
  • 3
  • 16
  • 24