Add Firebase Crashlytics in android java
<ol>
<li>Insert Firebase Crashlytics in app build.gradle to get plugin</li>
</ol>
<pre>
plugins {
id 'com.android.application'
id 'com.google.firebase.crashlytics'
id 'com.google.gms.google-services'
}</pre>
<pre>
dependencies {
implementation 'com.google.firebase:firebase-crashlytics:18.3.2'
implementation 'com.google.firebase:firebase-analytics:21.2.0'
implementation platform('com.google.firebase:firebase-bom:32.2.0')
}</pre>
<p>2. Insert classpath Firebase Crashlytics in build.gradle to get plugin</p>
<pre>
buildscript {
ext.kotlin_version = "1.7.10"
repositories {
jcenter()
google()
mavenCentral()
maven {
url "https://jitpack.io"
}
}
dependencies {
classpath "com.android.tools.build:gradle:7.0.4"
classpath 'com.google.gms:google-services:4.3.14'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.9.2'
}
}
allprojects {
repositories {
jcenter()
google()
mavenCentral()
maven { url "https://jitpack.io" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}</pre>
<p>3. For testing can put in launcher Main Activity code below to test workable data button on click.</p>
<p><a href="https://medium.com/@hasperong/add-firebase-crashlytics-in-android-java-96555f2872d0">Click Here</a></p>