【发布时间】:2011-08-15 15:15:06
【问题描述】:
我想在控制台中打印一些东西。我能做些什么?因为 System.out.println 不起作用。有些人说它有效,但有些人说它无效。哪一个对? 谢谢
【问题讨论】:
标签: android printing android-logcat
我想在控制台中打印一些东西。我能做些什么?因为 System.out.println 不起作用。有些人说它有效,但有些人说它无效。哪一个对? 谢谢
【问题讨论】:
标签: android printing android-logcat
您应该使用 android SDK 中的 Log 类。 http://developer.android.com/reference/android/util/Log.html
喜欢
final string tag = "myApp";
Log.d(tag,"hello world");
【讨论】:
System.out.println() 有效,Log.d("TAG", "message"); 也有效,但您需要在 eclipse 中打开 LogCat 视图,不是控制台视图。
【讨论】: