开发者

On eclipse, developing for Android, where can i see the output of System.out.println()?

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 was开发者_运维问答n't there either.

Thanks in advance!


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

Documentation here.


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


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

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


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


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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜