Fabric - Crashlytics

suggest change

Fabric is a modular mobile platform that provides useful kits you can mix to build your application. Crashlytics is a crash and issue reporting tool provided by Fabric that allows you to track and monitor your applications in detail.


How to Configure Fabric-Crashlytics

Step 1: Change your build.gradle:

Add the plugin repo and the gradle plugin:

buildscript {
 repositories {
   maven { url 'https://maven.fabric.io/public' }
 }

 dependencies {
   // The Fabric Gradle plugin uses an open ended version to react
   // quickly to Android tooling updates
   classpath 'io.fabric.tools:gradle:1.+'
 }
}

Apply the plugin:

apply plugin: 'com.android.application'
//Put Fabric plugin after Android plugin
apply plugin: 'io.fabric'

Add the Fabric repo:

repositories {
  maven { url 'https://maven.fabric.io/public' }
}

Add the Crashlyrics Kit:

dependencies {
  
  compile('com.crashlytics.sdk.android:crashlytics:2.6.6@aar') {
    transitive = true;
  }
}

Step 2: Add Your API Key and the INTERNET permission in AndroidManifest.xml

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
  <application
     ... >
      
      <meta-data
          android:name="io.fabric.ApiKey"
          android:value="25eeca3bb31cd41577e097cabd1ab9eee9da151d"
          />

  </application>
  
  <uses-permission android:name="android.permission.INTERNET" />
</manifest>

Step 3: Init the Kit at runtime in you code, for example:

public class MainActivity extends ActionBarActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
      super.onCreate(savedInstanceState);

      //Init the KIT
      Fabric.with(this, new Crashlytics());

      setContentView(R.layout.activity_main);
    }
}

Step 4: Build project. To build and run:


Using the Fabric IDE plugin

Kits can be installed using the Fabric IDE plugin for Android Studio or IntelliJ following this link.

After installing the plugin, restart Android Studio and login with your account using Android Studio.

( short key > CTRL + L)

Then it will show the projects that you have / the project you opened, select the one you need and click next .. next.

Select the kit you would like to add, for his example it is Crashlytics :

Then hit Install. You don’t need to add it manually this time like above gradle plugin, instead it will build for you.

Done!

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:


Crash Reporting Tools:
* Fabric - Crashlytics

Table Of Contents
2 Gradle
5 Intent
17 Service
19 WebView
31 SQLite
35 Glide
37 Dialog
38 ACRA
44 Handler
53 Toast
63 Menu
65 Picasso
70 Volley
71 Widgets
78 Realm
90 Spinner
95 OkHttp
100 Crash Reporting Tools
108 TextView
109 ListView
111 Loader
118 Xposed
119 Security
121 ImageView
123 Doze Mode
130 Drawables
131 Colors
134 Fresco
139 AdMob
145 Keyboard
146 Button
150 EditText
155 Vk SDK
163 ExoPlayer
169 XMPP
175 OpenCV
177 Threads
184 ORMLite
186 TabLayout
190 LruCache
192 Zip files
194 Fastlane
199 FileIO
202 Moshi
210 VideoView
216 Paint
218 ProGuard
226 CleverTap
228 ADB shell
229 Ping ICMP
230 AIDL
234 Context
240 JCodec
242 Okio
249 FuseView
254 Looper
261 Fastjson
263 Jackson
267 Smartcard