Android print stack trace

前端 未结 4 2322
忘掉有多难
忘掉有多难 2021-02-15 12:36

How can I get the equivalent of a printStackTrace in android? I know I can log an error, by passing in a tag name and a String to the logging method, but that just gives me a nu

4条回答
  •  长情又很酷
    2021-02-15 13:02

    If you are using eclipse make sure you have LogCat window opended. You can find it under

    Window-> Show View-> Other -> Under Android -> LogCat

    updated:2014 July

    OR if you are using Android Studio you can find it under

    Window menu -> Show view -> Logcat

    LogCat is like a console in normal JAVA. Your e.printstacktrace() would appear in LogCat as well.

提交回复
热议问题