2

我正在使用 eclipse 开发一个 android 应用程序。如何查看 printstacktrace 的输出?

4

4 回答 4

4

printstacktrace 的输出可以在 DDMS ->Logcat 视图中看到

打印Log的请使用Log。消息类型及其相关方法调用有:

The Log.e() method is used to log errors.

The Log.w() method is used to log warnings.

The Log.i() method is used to log informational messages.

The Log.d() method is used to log debug messages.

The Log.v() method is used to log verbose messages.

The Log.wtf() method is used to log terrible failures that should never happen. (“WTF” stands for “What a Terrible Failure!” of course.)

要查看日志输出,请转到 DDMS > LogCat

于 2013-03-16T11:12:56.763 回答
1

在eclipse上的android开发中,最好使用logcat。在 Eclipse 中,转到 Window/Show View/Other... 并从对话框中选择 Android 下的 Logcat。

在eclipse中打开Logcat

当您在调试模式下启动应用程序时,所有消息都将记录在那里。您可以使用过滤器隐藏来自系统或其他应用程序的消息。

于 2013-03-16T11:17:13.340 回答
0

在 Android 中,您应该更喜欢Log类方法而不是printStackTrace(). Log您可以在 DDMS 的 logcat 中看到输出。希望这可以帮助。

于 2013-03-16T11:08:24.930 回答
0

查看 printstacktrace 的输出..

使用Log类方法..比如Log.iLog.v等等。

要查看日志输出,请转到DDMS > LogCat

于 2013-03-16T11:09:39.910 回答