Rather than trying to output to the console, Log
will output to LogCat which you can find in Eclipse by going to: Window->Show View->Other…->Android->LogCat
请看一下reference for Log
号.
使用LogCat的好处是,您可以根据日志(log)类型打印不同的 colored颜色 ,例如:Log.d
个蓝色打印,Log.e
个橙色打印.此外,还可以按log tag、log message、process id和/或application name进行过滤.当你只想查看应用程序的日志(log)并将其他系统内容分开时,这非常有用.