简体   繁体   English

在Android Developer Console上崩溃和ANR

[英]Crashes and ANR on Android Developer Console

I just recently launched an application on the Google Play Store, and I was exploring the developer console and saw the tab for Crashes and ANR . 我刚刚在Google Play商店推出了一个应用程序,我正在探索开发人员控制台,并看到了Crashes and ANR的标签。

What does ANR stand for? ANR代表什么?

Also, my app seems to have crashed on some of my friend's phone before, but there was no way for them to "report" such crashes. 此外,我的应用程序似乎已经在我朋友的一些电话上崩溃了,但他们无法“报告”此类崩溃。 How should I enable such functions for users to report crashes for me to see in the developer console under the Crashes/ANR tab? 我应该如何启用此类功能以便用户报告崩溃,以便在Crashes / ANR选项卡下的开发人员控制台中查看?

ANR stands for Application Not Responding. ANR代表Application Not Responding。 If your app is doing a lot of work on the UI thread then you'll see one of those force close/wait dialogs. 如果您的应用程序在UI线程上做了大量工作,那么您将看到其中一个强制关闭/等待对话框。 That's ANR. 这是ANR。

As for crash reporting, if your app is distributed through Google Play then crash reporting is built in. When your app crashes, the user will get a dialog with the options "Force Close" or "Report." 至于崩溃报告,如果您的应用是通过Google Play分发的,则会内置崩溃报告。当您的应用崩溃时,用户将会看到一个包含“强制关闭”或“报告”选项的对话框。 The user has to press the Report option to send you the crash report, otherwise you may never know. 用户必须按“报告”选项向您发送崩溃报告,否则您可能永远不会知道。

If you're not distributing through Google Play, you might want to consider a library like ACRA which will email you crash reports, upload them to a Google Docs spreadsheet, or you can write your own custom handler for dealing with crash reports. 如果您没有通过Google Play进行分发,则可能需要考虑像ACRA这样的图书馆,它会向您发送崩溃报告,将其上传到Google文档电子表格,或者您可以编写自己的自定义处理程序来处理崩溃报告。

Details about ACRA can be found here: http://code.google.com/p/acra/ 有关ACRA的详细信息,请访问: http//code.google.com/p/acra/

Below is a sampling of what these dialogs look like. 下面是这些对话框的样例。 Close/report dialogs on the left and ANR on the right. 左侧是关闭/报告对话框,右侧是ANR。 Android 3.0+ is on top with the older dialogs on the bottom. Android 3.0+位于顶部,底部有较旧的对话框。

在此输入图像描述

When an application crashes, a tombstone is generated. 当应用程序崩溃时,会生成一个墓碑。 Essentially, your app needs to be aware that portions of it crashed (if you rely on some API or library that provides callbacks / status) but if it's really just your app dying - you will have a somewhat hard time figuring out whether it crashed or not. 从本质上讲,你的应用程序需要知道它的部分崩溃(如果你依赖一些提供回调/状态的API或库),但如果它真的只是你的应用程序死亡 - 你将有一段时间难以弄清楚它是否崩溃或不。

"Error reporting" isn't a premade class you can use in android, and you may have to roll one of your own. “错误报告”不是你可以在android中使用的预制类,你可能必须自己动手。 Then again, there's ACRA - http://acra.ch/ 再一次,有ACRA - http://acra.ch/

some links: 一些链接:

http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html http://android-developers.blogspot.com/2010/05/google-feedback-for-android.html

http://developer.android.com/distribute/googleplay/strategies/app-quality.html http://developer.android.com/distribute/googleplay/strategies/app-quality.html

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

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