How do I obtain crash-data from my Android application?

前端 未结 30 2494
庸人自扰
庸人自扰 2020-11-22 01:10

How can I get crash data (stack traces at least) from my Android application? At least when working on my own device being retrieved by cable, but ideally from any instance

相关标签:
30条回答
  • 2020-11-22 01:27

    You can also try [BugSense] Reason: Spam Redirect to another url. BugSense collects and analyzed all crash reports and gives you meaningful and visual reports. It's free and it's only 1 line of code in order to integrate.

    Disclaimer: I am a co-founder

    0 讨论(0)
  • 2020-11-22 01:27

    Just Started to use ACRA https://github.com/ACRA/acra using Google Forms as backend and it's very easy to setup & use, it's the default.

    BUT Sending reports to Google Forms are going to be deprecated (then removed): https://plus.google.com/118444843928759726538/posts/GTTgsrEQdN6 https://github.com/ACRA/acra/wiki/Notice-on-Google-Form-Spreadsheet-usage

    Anyway it's possible to define your own sender https://github.com/ACRA/acra/wiki/AdvancedUsage#wiki-Implementing_your_own_sender you can give a try to email sender for example.

    With minimum effort it's possible to send reports to bugsense: http://www.bugsense.com/docs/android#acra

    NB The bugsense free account is limited to 500 report/month

    0 讨论(0)
  • 2020-11-22 01:27

    You can do this directly in Android Studio. Just connect your phone, run the app, let it crash and you can view the stacktrace directly in Android Studio.

    0 讨论(0)
  • 2020-11-22 01:28

    Google Firebase is Google's latest(2016) way to provide you with crash/error data on your phone. Include it in your build.gradle file :

    compile 'com.google.firebase:firebase-crash:9.0.0'
    

    Fatal crashes are logged automatically without requiring user input and you can also log non-fatal crashes or other events like so :

    try
    {
    
    }
    catch(Exception ex)
    {
        FirebaseCrash.report(new Exception(ex.toString()));
    }
    
    0 讨论(0)
  • 2020-11-22 01:28

    If your app is being downloaded by other people and crashing on remote devices, you may want to look into an Android error reporting library (referenced in this SO post). If it's just on your own local device, you can use LogCat. Even if the device wasn't connected to a host machine when the crash occurred, connected the device and issuing an adb logcat command will download the entire logcat history (at least to the extent that it is buffered which is usually a loooot of log data, it's just not infinite). Do either of those options answer your question? If not can you attempt to clarify what you're looking for a bit more?

    0 讨论(0)
  • 2020-11-22 01:29

    Google Play Developers Console actually gives you the Stack traces from those apps that have crashed and had sent the reports, it has also a very good charts to help you see the information, see example below:

    enter image description here

    0 讨论(0)
提交回复
热议问题