简体   繁体   English

堆栈跟踪不适用于谷歌播放控制台中的 ANR

[英]Stack trace not available for ANR in google play console

I am facing issue while debugging our ANR's.我在调试我们的 ANR 时遇到问题。 After fixing few ANR's in the last releases suddenly facing the TOP ANR's not having any stack trace.在最后一个版本中修复了几个 ANR 后突然面临 TOP ANR 没有任何堆栈跟踪。 在此处输入图像描述

Any idea what is the issue over here.知道这里的问题是什么。 My code having Native code also.我的代码也有本机代码。

No update from the Google.谷歌没有更新。 But you can use github.com/SalomonBrys/ANR-WatchDog as mention by Sabet in the comment section.但是您可以使用Sabet在评论部分提到的 github.com/SalomonBrys/ANR-WatchDog。 Very handy tool, easy to integrate and use.非常方便的工具,易于集成和使用。 I used it with firebase crashlytics.我将它与 firebase crashlytics 一起使用。 It provide better logs/stacktrace then google.它提供比谷歌更好的日志/堆栈跟踪。

How it works怎么运行的

The watchdog is a simple thread that does the following in a loop:看门狗是一个简单的线程,它循环执行以下操作:

  1. Schedules a runnable to be run on the UI thread as soon as possible.安排 runnable 尽快在 UI 线程上运行。
  2. Wait for 5 seconds.等待 5 秒钟。 (5 seconds is the default, but it can be configured). (默认为 5 秒,但可以配置)。
  3. See if the runnable has been run.查看runnable是否已经运行。 If it has, go back to 1.如果有,则 go 返回 1。
  4. If the runnable has not been run, which means that the UI thread has been blocked for at least 5 seconds, it raises an error with all running threads stack traces.如果 runnable 尚未运行,这意味着 UI 线程已被阻塞至少 5 秒,它会引发所有正在运行的线程堆栈跟踪的错误。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM