集成Firebase收集崩潰日誌

Firebase關聯APP


  1. 登陸Firebase的官網:https://www.firebase.com/login/。下面是登陸後的界面:

  2. 創建Firebase的應用



    以下是創建成功後的界面:

  3. 按提示關聯我們的APP


  4. 添加崩潰統計服務
    有2種方案,但後續既然都打算換fabirc就直接選第一個了。

    點擊後會跳轉到到Fabric的登陸界面,地址爲:https://fabric.io/login
    以下是登陸Fabric後的界面:

  5. 按提示配置依賴並同步

  6. 添加測試代碼,運行崩潰後,過幾分鐘可以前往https://fabric.io/dashboard進行查看崩潰的信息(這個時間不一定有多快)

  7. 如果過了好久沒看到崩潰信息,可以從下面2方面進行排查

1:Make sure the Fabric.with() line is after all other 3rd-party SDKs that set an UncaughtExceptionHandler 2:Relaunch the app after it has crashed to retry uploading the crash