Migrating Crashlytics to the Firebase Console

This article was also published on ProAndroidDevSee Here

Last week I setup a project to use Crashlytics for Android as our crash reporting tool.

Firebase on Twitter

Use Crashlytics (NEW) and Perf Monitoring to increase app retention and keep users happy! #FirebaseSummit live → https://t.co/eSmn1vZtaf

This week, at the Firebase Dev Summit, support was announced for Crashlytics issue reporting from within your existing Firebase console.

Since I prefer to use as few different service consoles as possible, I wanted to migrate over to the new Firebase Crashlytics reporting.  It was a pretty straightforward process with a couple small gotchas, so I thought I would share what I found.

 

 

Starting Point

I started with an app that was configured to use Crashlytics and report to the Fabric console as described here.

To help demonstrate the migration process, I set up a sample project on GitHubThis commit installs the Fabric/Crashlytics kit, and will send crash reports to the Fabric console when a button is clicked.

At this point, the sample app works the same way as the app I had set up last week.

 

 

Enable Firebase

If you already have a Firebase enabled app, you can skip down to the next section.

Before you can start receiving crash reports within the Firebase console, you must have a Firebase enabled app.  A more detailed overview of this process can be found here but I’ve included the basic steps below:

Screen Shot 2017-11-03 at 6.59.04 PM
Start by clicking “Add another app”
Screen Shot 2017-11-03 at 6.59.22 PM
Choose “Android”
Screen Shot 2017-11-03 at 6.59.34 PM
Enter the package name of your app, and an alias if desired
Screen Shot 2017-11-03 at 6.59.54 PM
Download the “google-services.json” file and add it to your app’s directory
Screen Shot 2017-11-03 at 7.00.10 PM
Add the Firebase plugin to your app

 

 

Migrate to Firebase Console

Once you have a Firebase app created, you can migrate over to using Firebase for your crash reporting.

Using the Getting Started docs as a guide, I was able to migrate crash reports by doing the following:

  1. In build.gradle: update the Fabric plugin to version 1.24.4
  2. Add   maven { url "https://maven.google.com/" } to build.gradle
  3. To app/build.gradle add the Firebase sdk: implementation "com.google.firebase:firebase-core:11.4.2"

 

The first small gotcha was that I then also had to update the google-services plugin to version 3.1.2Commit Here

At this point, I was able to deploy the app, but my crash reports were still not showing up in the firebase console.

The 2nd gotcha was that I seemingly needed to remove the api key meta-data from the app’s Manifest.xmlCommit Here

Once I removed that and redeployed, the crash reports started coming through in the Firebase console.  Hooray!

The full migration changes can be found in this commit.

 

Screen Shot 2017-11-03 at 7.38.11 PM
The Crashlytics view within the Firebase console

 

I’m now happily using Crashlytics and collecting/analyzing crash reports from within our Firebase console.

Nate Ebel on Twitter

I’m probably a little too excited about having #crashlytics as a part of #Firebase now But it felt good to open up that new console today 😀


 

. . .

Thoughts, questions, tips on Crashlytics or Firebase? Comment below or share on social media.  I’d love to continue the conversation.


I love to meet/talk/discuss and help where I can. If you want to chat or ask a question you can follow me on Twitter, YouTube, Instagram and Facebook.

Check Out My YouTube Channel

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.