Android print stack trace

前端 未结 4 2439
忘掉有多难
忘掉有多难 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 12:58

    The data is still printed to the DDMS logs with e.printStackTrace(); You can also use Log.e("Tag", "Description", e); which will print the logs as well. DDMS is located under android-sdk/tools/ddms and logs will be shown in the bottom pane on launch.

提交回复
热议问题