Setting up a new app in Crashlytics without the IDE plugin

I like Crashlytics. I like the service they provide: their crash logs have saved my ass countless times. I also like that it's free.

However, there is one problem I've run into time and time again: getting new apps setup with it. They have a plugin... but you're probably not here because it worked.

For your reference (and mine), here's how you get Crashlytics setup with a new project. Just the code, no fluff.

  1. Add the Crashlytics plugin to your build.gradle:

     buildscript {
         repositories {
             // 1. Add the Crashlytics Maven repository
             maven { url '' }
         dependencies {
             // 2. Add the Crashlytics plugin to your dependencies
             classpath ''
     apply plugin: ''
     // 3. Apply the Crashlytics plugin after the Android plugin
     apply plugin: 'crashlytics'
     repositories {
         // 4. Add the Maven repository
         maven { url '' }
     dependencies {
         // 5. Add the Crashlytics SDK to the Android project
         compile ''
  2. Make sure your app has INTERNET permissions in AndroidManifest.xml:

         <uses-permission android:name="android.permission.INTERNET" />
         <!-- ...The rest of your junk... -->

    What, did you think Crashlytics would work without internet access? :P

  3. Add your API key as metadata inside the <application> tag in AndroidManifest.xml:

         <!-- ...All your activities, services, etc... -->
             android:value="YOUR_KEY_GOES_HERE" />

    To get your API key, go to this link, then click on the organization you want the app to be in:

    Getting your API key, step 1

    Get your API key here:

    Getting your API key, step 2

  4. Call Crashlytics.start() in Application.onCreate():

     public void onCreate() {
  5. (Optional) Add this line to your version control's ignore file (e.g., Git's .gitignore):


    Though not strictly necessary, doing this avoids committing unwanted files into your repository.

  6. Launch your app. If all went well you should see it on your dashboard shortly.

Congratulations, you're now ready to use Crashlytics without ever having to install a plugin!

Thanks to @niftynei for both inspiring and proofreading this post.