更新时间:2023-12-05 12:20:16
而不是试图输出到控制台,登录
将输出到LogCat中,你可以在Eclipse中找到通过将:窗口 - >显示视图>其他... - > Android-> LogCat中的
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
有一个看参考登录
。
使用LogCat中的好处是,你可以打印不同的颜色取决于你的日志类型,如: Log.d
打印蓝,日志。 Ë
打印橙色。您也可以通过筛选的的日志标签的 的日志信息的 进程id 和/或通过的的应用程序名的。当你只是想看看你的应用程序的日志,并保留其他系统不同的东西,这是非常有用的。
The benefits of using LogCat are that you can print different colours depending on your log type, e.g.: Log.d
prints blue, Log.e
prints orange. Also you can filter by log tag, log message, process id and/or by application name. This is really useful when you just want to see your app's logs and keep the other system stuff separate.