Like many people, I am not able to add my application with Firebase Crashlytics.
I followed all the steps from the official documentation.
Also I previously checked and added my application to Firebase and everything is working fine.
My issue is the following:
ERROR - Crashlytics Developer Tools error.
java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null.
Check the Crashlytics plugin to make sure that the application has been added successfully!
Contact support#fabric.io for assistance.
I have the google-services.json file set correctly.. From the official documentation, it should works now without anything else to do..
Edit - Solution
Like I said in the comments, I found the issue. It's because of the Gradle version that I was using. I moved my project to support AndroidX and I was using the latest version 3.3+ but with this version the google-services.json file is not parsed during the build phase. It is resolved with the 3.2+ version.
From Firebase team, only stable version are working.
Is your project built to support instant apps (i.e. you have a base feature module, installable module, and instant app module)? I've been dealing with this exact error for the last day and a half, and what finally fixed it for me was adding crashlytics { instantAppSupport true } to the bottom of my gradle file for my base feature module. If you are built for instant apps, this might be worth a shot.
Are you sure you have added the Crashlytics API Key in one of these files?
AndroidManifest.xml:
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxxxxxxxxxxxxxxxxxxxxxxx" />
Fabric Properties:
# Fabric properties file: app/fabric.properties
apiSecret=xxxxxxxxxxxxxxxxxxxxxxxxxxx
apiKey=xxxxxxxxxxxxxxxxxxxxxxxxxxx
Related
I am working on a project that contains multiple Java modules. Implementing new Firebase Crashlytics went fine with main Application module, and I get crash reports in Firebase console, but I can't get it to work with these other library modules. The only thing similar to the problem I have is in this Fabric docs link, but even dough Google bought them, it doesn't work with Firebase version of Crashlytics.
Like all other Firebase SDKs, Firebase Crashlytics depends on a Firebase configuration that can only be applied to your application module. You can't apply Firebase configuration to a library module. You can put the Crashlytics dependency in a library module, but you still need to configure the app module so the SDK knows where to report the errors it captures. This involves google-services.json and applying the fabric.io plugin, as described in the documentation.
I want to integrate Firebase Crashlytics into my Android game (developed using Cocos2D-X engine).
I have followed the steps mentioned in this link.
I'm getting following error when building the project using Android Studio:
ERROR - Crashlytics Developer Tools error.
java.lang.IllegalArgumentException: Crashlytics found an invalid API key: null.
Check the Crashlytics plugin to make sure that the application has been added successfully!
It looks like that I am missing some API key. How can I find the Crashlytics API key in Firebase? How to mention that key in the Android project?
I would appreciate any suggestions and thought on this topic. Thank you.
Rolling back to "com.google.gms:google-services:4.0.1" in my project build.gradle file fixed the problem for me.
The Firebase docs say to use version 4.1.0, which if you follow will give the error above.
Please note the following things, this should solve your issue:
Check Android Studio version, suggested version is 3.1.4.
Classpath (project-level build.gradle file shouldn't have any alpha or beta versions. That is because Firebase only supports stable version of Android Studio.
That said, the recommended setup of your gradle version is:
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.gms:google-services:4.1.0'
Firebase Crashlytics requires the Google services Gradle plugin (com.google.gms:google-services) in your build script to process the google-services.json file at build time. However, Crashlytics does work on devices that do not have Google Play services.
I have added this line at end of build.gradle
apply plugin: 'com.google.gms.google-services'
I am trying out the new Firebase/Crashlytics setup and seem to run into a weird issue.
I have one Android code base with multiple product flavors and each flavor is a separate individual app.
all of these apps are registered in Fabric (from the past)
all of these apps are added in Firebase
All linking between the two seems ok (from Fabric side as well as from Firebase side, it says that it is all linked up)
I removed the Fabric API key from the manifest file and added the appropriate plugins/dependencies etc. to both gradle files
I try to send a test crash report as per Firebase instructions.
I receive it perfectly fine on one of the product flavors, so I assume all works well.
However,
the rest of the product flavors do not send the crash report and I get this error in log:
E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/package name/settings
Ok, I think I solved the problem, but the solution does not seem to be the way it should work (at least I do not think).
Go to Firebase Console > Project Settings > Account Linking > Fabric > Select the app and Unlink it
Confim in Fabric > App > Firebase - that it is unlinked
Go to Firebase > Project > Crashlytics (select the app you want) and you should now get a dialog to link your app again
Choose to link as a New Crashlytics (not existing one) and follow the directions
After that all should work fine
So basically, from Fabric>Firebase screen - there is no link visible and from Firebase>Account Linking>Fabric screen - there is also no linking visible. So no linking, but your crashes will be visible in Firebase.
This takes me a lot of time than I figured out how to migrate correctly. Actually you have two ways how to do it:
Perform clean migration without keeping crash history from Fabric Crashlytics
This way is described in Firebase Crashlytics developer guide. You have to here remove com.crashlytics.ApiKey meta-data from app manifest file.
With this way you must not link Fabric with Firebase otherwise crashes will not shown in Firebase nor Fabric console.
Link Fabric with Firebase and keep the crash history
This way is probably nowhere documented. Crucial is here to keep com.crashlytics.ApiKey meta-data in your manifest. Then you need to link Fabric Crashlytics with Firebase. You can also enable forwarding Events (formerly Answers) to Firebase Analytics. Both actions are presented in Fabric console, look for Firebase in a side menu.
All new crash reports show up in both Fabric console and Firebase console. Also this linking arrange a copying all Fabric crash report history to Firebase.
I think firebase-core artifact is not necessary here, but I added it. I'm also using Fabric Events, so with firebase-core additional app usage events was appeared in Firebase Analytics.
I had the same issue and it took me a lot of time to figure out.
I solved my problem by going to FireBase Console > [my project] > Crashlytics. In the dropdown you need to select your app. After that a wizard with three steps will show up.
Click whatever option suits you, I chose the first because it's a new app. After that the second step shows up.
Now here comes the important part. Make sure you click the link to go to the documentation! A new browser tab will open up. If you already finished the project setup like me, you can close it. After that you will automatically go to the 3rd option. Most of the time I never clicked the link because I had already completed the installation. And once I did I never noticed that the 3rd option was available because I'm at the other tab. As a result I never got to see the 3rd option.
At this point you should open your app and it will automatically connect to Firebase without any problem.
Edit: After I tried to add some other build variants I noticed that I was still getting some errors while retrieving the settings. It took me a lot of time to figure out how to solve it. The best thing I could come up with is:
switch to build variant
perform an assemble[YOUR_BUILD_VARIANT] on the gradle tab.
build > rebuild project
delete old app from device if present.
install app and open it.
Sometimes this also didn't work and I tried the same steps again one or two times and suddenly it started working...
It also helped me to enable additional debug logging for fabric and crashlytics.
adb shell setprop log.tag.Fabric DEBUG
adb shell setprop log.tag.CrashlyticsCore DEBUG
If there's network connectivity (like in Airplane mode), you will get this error even if everything is setup correctly.
You will also get:
E/Fabric﹕ Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/com.xyz/settings
W/Fabric﹕ Received null settings, skipping initialization!
To prevent Crashlytics from further crashing when logging, I do this:
boolean fabricInitialized = Fabric.isInitialized();
if (fabricInitialized) {
Crashlytics.log(someString);
}
Go to the settings of the project and add SHA-1 key for your android app.
After that redownload google-service.json to your sources.
This causes disappearing of this error
E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/package name/settings
And after quite a huge delay you'll see crashes in Firebase Console.
By the way this doesn't help me with apps that were registered under one Google account, and after that moved to another account. Wiating for a response of Firebase team about this issue.
You probably forgot to add:
<meta-data
android:name="io.fabric.ApiKey"
android:value="h4132h4k324hjh4l4324h24hk21h4kj2h4" />
To your Manifest file. At least in my case, that was the reason.
In my case, the location of meta-data:io.fabric.ApiKey was wrong.
app/src/main/AndroidManifest.xml
before
<application
...>
<activity
...>
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxx" />
</activity>
</application>
after
<application
...>
<activity
...>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxx" />
</application>
I hope this will be of some help.
I'm finding out that I had to unregister and re-register my existing apps with Firebase after converting over to FirebaseCrashlytics.
Make sure you get your app to the following point before running it for it's initial FirebaseCrashlytics registration (console waits for initial registration), otherwise it won't register:
enter image description here
None of this is obvious!
Upgrade to the Firebase Crashlytics SDK Android & iOS
You can now set up Crashlytics in your app by using the new official Firebase Crashlytics SDK, which offers improved APIs that are more consistent with other Firebase products and more intuitive to use. This guide describes how to upgrade to the new SDK from the Fabric Crashlytics SDK. It describes the changes that come with the new APIs, the reason for the changes, and how to update your code, if required.
Android
Precondition: Migrate your app to AndroidX
1. Add a Firebase configuration file
Open your Project Settings.
Click Download google-services.json to obtain your Firebase Android config file.
Move your config file into the module (app-level) directory of your app.
2. Switch your dependencies
(project-level)/build.gradle
Deprecated From:
buildscript {
// ...
repositories {
// ...
// Remove Fabric's Maven repository.
maven { url 'https://maven.fabric.io/public' }
// Add Google's Maven repository (if it's not there already).
google()
}
dependencies {
// ..
// Add the Google Services Gradle plugin (if it's not there already).
classpath 'com.google.gms:google-services:4.3.3'
// Remove the Fabric Gradle plugin.
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
To:
buildscript {
// ...
repositories {
// ...
// Add Google's Maven repository (if it's not there already).
google()
}
dependencies {
// ..
// Add the Google Services Gradle plugin (if it's not there already).
classpath 'com.google.gms:google-services:4.3.3'
// Add the Firebase Crashlytics Gradle plugin.
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
}
}
(app-level)/build.gradle
Finally, add the Firebase Crashlytics SDK. In your app-level build.gradle, replace the legacy Fabric Crashlytics SDK with the new Firebase Crashlytics SDK. For an optimal experience with Firebase Crashlytics, we recommend also adding the Firebase SDK for Google Analytics to your app (make sure to add Version 17.2.3 or later in order to get real time crash-free users and breadcrumbs).
Deprecated From:
apply plugin: 'com.android.application'
// Apply the Google Services plugin (if it's not there already).
apply plugin: 'com.google.gms.google-services'
// Remove the Fabric plugin.
apply plugin: 'io.fabric'
dependencies {
// Remove the Fabric Crashlytics SDK.
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
// Recommended: Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:17.4.1'
}
To:
apply plugin: 'com.android.application'
// Apply the Google Services plugin (if it's not there already).
apply plugin: 'com.google.gms.google-services'
// Add the Firebase Crashlytics plugin.
apply plugin: 'com.google.firebase.crashlytics'
dependencies {
// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
// Recommended: Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:17.4.1'
}
Update your code
Crashlytics.log is now an instance method
From Fabric: Crashlytics.log("my message");
To Firebase Crashlytics SDK:
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
// To log a message to a crash report, use the following syntax:
crashlytics.log("E/TAG: my message");
The crash method is removed
From Fabric: Crashlytics.getInstance().crash().
To Firebase Crashlytics SDK:
throw RuntimeException("Test Crash")
Now, FirebaseCrashlytics starts up automatically using a
ContentProvider defined in the new Firebase Crashlytics SDK. Remove
calls to Fabric.with() if they exist. If you're already using Firebase
Crashlytics, your app may already be using automatic startup and may
not contain a call to Fabric.with().
GL
I came across this issue in the new Firebase SDK upgrade to 17.0.0+ version.
The issue was caused when we use multiple flavors. In case you are using a separate flavor - debug and have it linked to firebase as well, instead of adding the google-services.json file to the app root, we have to add the flavor specific json file to the appropriate folder for the flavor - app -> src -> (flavor folder).
This will ensure that the generated code has the correct client id for the flavor.
This is a silly mistake but there are chances for people to miss it.
At First you have to enable the Crashlytics in the Crashlytics tab in your project in the console (before or after adding all the dependencies of crashlytics) or follow these steps present in this
link:
https://firebase.google.com/docs/crashlytics/get-started?authuser=0&platform=android
After checking internet connection, I solved this issue by activate Crashlytics for my app in the Firebase console (then, relaunch app and all should work fine)
I posting this answer for those who want it to get it working without unlinking their app from Firebase Crashlytics.
To Achieve this they have to do following,
Add fabric API key back in AndroidManifest as metadata.
<meta-data
android:name="io.fabric.ApiKey"
android:value="fabric_api_key"
/>
Initialize Fabric.
Fabric.with(this, new Crashlytics());
After doing these two steps Crashlytics starts working again without unlinking your app.
I finally managed to get google app invites working in my app. I enabled them on the developer console and followed this guide. The following steps were giving me problems:
Add the dependency to your project's top-level build.gradle:
classpath 'com.google.gms:google-services:1.3.0-beta1'
Add the plugin to your app-level build.gradle:
apply plugin: 'com.google.gms.google-services'
Copy the google-services.json file you just downloaded into the app/ or mobile/ directory of your Android Studio project.
By adding that classpath I had to use jcenter as my repository, as this package isn't available at mavenCentral. However, even if I built the project with jcenter as a repository, the gradle build failed with an empty error message. I tried to debug the problem but the stacktrace for the crash was enormous.
My solution was to simply ignore these steps. The app invites are working flawlessly since then.
With this in mind, here goes my question. Why were all these steps listed on the official google guide if they are not necessary? Am I missing something here?
When I started official sample for Invite API yesterday, I had problem but just because of version of google-services (1st step -> add the dependency of your project's top-level build.gradle), so I have to change it to the latest version:
classpath 'com.android.tools.build:gradle:1.3.0-beta4'
classpath 'com.google.gms:google-services:1.3.0-beta4'
and this solves all problems. I don't understand your question, which step you exactly skipped of these 3 steps mentioned and made invite api functional?
Finally found the answer. The service was working on my prototype because it doesn't check for credentials on the test device. Once released to public, the keys are needed for the service to work correctly as Ituoke Ajanlekoko said in the comments.
Further information can be found at this topic:
What does google-services.json really do?
I am trying out the new Firebase/Crashlytics setup and seem to run into a weird issue.
I have one Android code base with multiple product flavors and each flavor is a separate individual app.
all of these apps are registered in Fabric (from the past)
all of these apps are added in Firebase
All linking between the two seems ok (from Fabric side as well as from Firebase side, it says that it is all linked up)
I removed the Fabric API key from the manifest file and added the appropriate plugins/dependencies etc. to both gradle files
I try to send a test crash report as per Firebase instructions.
I receive it perfectly fine on one of the product flavors, so I assume all works well.
However,
the rest of the product flavors do not send the crash report and I get this error in log:
E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/package name/settings
Ok, I think I solved the problem, but the solution does not seem to be the way it should work (at least I do not think).
Go to Firebase Console > Project Settings > Account Linking > Fabric > Select the app and Unlink it
Confim in Fabric > App > Firebase - that it is unlinked
Go to Firebase > Project > Crashlytics (select the app you want) and you should now get a dialog to link your app again
Choose to link as a New Crashlytics (not existing one) and follow the directions
After that all should work fine
So basically, from Fabric>Firebase screen - there is no link visible and from Firebase>Account Linking>Fabric screen - there is also no linking visible. So no linking, but your crashes will be visible in Firebase.
This takes me a lot of time than I figured out how to migrate correctly. Actually you have two ways how to do it:
Perform clean migration without keeping crash history from Fabric Crashlytics
This way is described in Firebase Crashlytics developer guide. You have to here remove com.crashlytics.ApiKey meta-data from app manifest file.
With this way you must not link Fabric with Firebase otherwise crashes will not shown in Firebase nor Fabric console.
Link Fabric with Firebase and keep the crash history
This way is probably nowhere documented. Crucial is here to keep com.crashlytics.ApiKey meta-data in your manifest. Then you need to link Fabric Crashlytics with Firebase. You can also enable forwarding Events (formerly Answers) to Firebase Analytics. Both actions are presented in Fabric console, look for Firebase in a side menu.
All new crash reports show up in both Fabric console and Firebase console. Also this linking arrange a copying all Fabric crash report history to Firebase.
I think firebase-core artifact is not necessary here, but I added it. I'm also using Fabric Events, so with firebase-core additional app usage events was appeared in Firebase Analytics.
I had the same issue and it took me a lot of time to figure out.
I solved my problem by going to FireBase Console > [my project] > Crashlytics. In the dropdown you need to select your app. After that a wizard with three steps will show up.
Click whatever option suits you, I chose the first because it's a new app. After that the second step shows up.
Now here comes the important part. Make sure you click the link to go to the documentation! A new browser tab will open up. If you already finished the project setup like me, you can close it. After that you will automatically go to the 3rd option. Most of the time I never clicked the link because I had already completed the installation. And once I did I never noticed that the 3rd option was available because I'm at the other tab. As a result I never got to see the 3rd option.
At this point you should open your app and it will automatically connect to Firebase without any problem.
Edit: After I tried to add some other build variants I noticed that I was still getting some errors while retrieving the settings. It took me a lot of time to figure out how to solve it. The best thing I could come up with is:
switch to build variant
perform an assemble[YOUR_BUILD_VARIANT] on the gradle tab.
build > rebuild project
delete old app from device if present.
install app and open it.
Sometimes this also didn't work and I tried the same steps again one or two times and suddenly it started working...
It also helped me to enable additional debug logging for fabric and crashlytics.
adb shell setprop log.tag.Fabric DEBUG
adb shell setprop log.tag.CrashlyticsCore DEBUG
If there's network connectivity (like in Airplane mode), you will get this error even if everything is setup correctly.
You will also get:
E/Fabric﹕ Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/com.xyz/settings
W/Fabric﹕ Received null settings, skipping initialization!
To prevent Crashlytics from further crashing when logging, I do this:
boolean fabricInitialized = Fabric.isInitialized();
if (fabricInitialized) {
Crashlytics.log(someString);
}
Go to the settings of the project and add SHA-1 key for your android app.
After that redownload google-service.json to your sources.
This causes disappearing of this error
E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/package name/settings
And after quite a huge delay you'll see crashes in Firebase Console.
By the way this doesn't help me with apps that were registered under one Google account, and after that moved to another account. Wiating for a response of Firebase team about this issue.
You probably forgot to add:
<meta-data
android:name="io.fabric.ApiKey"
android:value="h4132h4k324hjh4l4324h24hk21h4kj2h4" />
To your Manifest file. At least in my case, that was the reason.
In my case, the location of meta-data:io.fabric.ApiKey was wrong.
app/src/main/AndroidManifest.xml
before
<application
...>
<activity
...>
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxx" />
</activity>
</application>
after
<application
...>
<activity
...>
</activity>
<meta-data
android:name="io.fabric.ApiKey"
android:value="xxxxxx" />
</application>
I hope this will be of some help.
I'm finding out that I had to unregister and re-register my existing apps with Firebase after converting over to FirebaseCrashlytics.
Make sure you get your app to the following point before running it for it's initial FirebaseCrashlytics registration (console waits for initial registration), otherwise it won't register:
enter image description here
None of this is obvious!
Upgrade to the Firebase Crashlytics SDK Android & iOS
You can now set up Crashlytics in your app by using the new official Firebase Crashlytics SDK, which offers improved APIs that are more consistent with other Firebase products and more intuitive to use. This guide describes how to upgrade to the new SDK from the Fabric Crashlytics SDK. It describes the changes that come with the new APIs, the reason for the changes, and how to update your code, if required.
Android
Precondition: Migrate your app to AndroidX
1. Add a Firebase configuration file
Open your Project Settings.
Click Download google-services.json to obtain your Firebase Android config file.
Move your config file into the module (app-level) directory of your app.
2. Switch your dependencies
(project-level)/build.gradle
Deprecated From:
buildscript {
// ...
repositories {
// ...
// Remove Fabric's Maven repository.
maven { url 'https://maven.fabric.io/public' }
// Add Google's Maven repository (if it's not there already).
google()
}
dependencies {
// ..
// Add the Google Services Gradle plugin (if it's not there already).
classpath 'com.google.gms:google-services:4.3.3'
// Remove the Fabric Gradle plugin.
classpath 'io.fabric.tools:gradle:1.31.2'
}
}
To:
buildscript {
// ...
repositories {
// ...
// Add Google's Maven repository (if it's not there already).
google()
}
dependencies {
// ..
// Add the Google Services Gradle plugin (if it's not there already).
classpath 'com.google.gms:google-services:4.3.3'
// Add the Firebase Crashlytics Gradle plugin.
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
}
}
(app-level)/build.gradle
Finally, add the Firebase Crashlytics SDK. In your app-level build.gradle, replace the legacy Fabric Crashlytics SDK with the new Firebase Crashlytics SDK. For an optimal experience with Firebase Crashlytics, we recommend also adding the Firebase SDK for Google Analytics to your app (make sure to add Version 17.2.3 or later in order to get real time crash-free users and breadcrumbs).
Deprecated From:
apply plugin: 'com.android.application'
// Apply the Google Services plugin (if it's not there already).
apply plugin: 'com.google.gms.google-services'
// Remove the Fabric plugin.
apply plugin: 'io.fabric'
dependencies {
// Remove the Fabric Crashlytics SDK.
implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
// Recommended: Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:17.4.1'
}
To:
apply plugin: 'com.android.application'
// Apply the Google Services plugin (if it's not there already).
apply plugin: 'com.google.gms.google-services'
// Add the Firebase Crashlytics plugin.
apply plugin: 'com.google.firebase.crashlytics'
dependencies {
// Add the Firebase Crashlytics SDK.
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
// Recommended: Add the Google Analytics SDK.
implementation 'com.google.firebase:firebase-analytics:17.4.1'
}
Update your code
Crashlytics.log is now an instance method
From Fabric: Crashlytics.log("my message");
To Firebase Crashlytics SDK:
FirebaseCrashlytics crashlytics = FirebaseCrashlytics.getInstance();
// To log a message to a crash report, use the following syntax:
crashlytics.log("E/TAG: my message");
The crash method is removed
From Fabric: Crashlytics.getInstance().crash().
To Firebase Crashlytics SDK:
throw RuntimeException("Test Crash")
Now, FirebaseCrashlytics starts up automatically using a
ContentProvider defined in the new Firebase Crashlytics SDK. Remove
calls to Fabric.with() if they exist. If you're already using Firebase
Crashlytics, your app may already be using automatic startup and may
not contain a call to Fabric.with().
GL
I came across this issue in the new Firebase SDK upgrade to 17.0.0+ version.
The issue was caused when we use multiple flavors. In case you are using a separate flavor - debug and have it linked to firebase as well, instead of adding the google-services.json file to the app root, we have to add the flavor specific json file to the appropriate folder for the flavor - app -> src -> (flavor folder).
This will ensure that the generated code has the correct client id for the flavor.
This is a silly mistake but there are chances for people to miss it.
At First you have to enable the Crashlytics in the Crashlytics tab in your project in the console (before or after adding all the dependencies of crashlytics) or follow these steps present in this
link:
https://firebase.google.com/docs/crashlytics/get-started?authuser=0&platform=android
After checking internet connection, I solved this issue by activate Crashlytics for my app in the Firebase console (then, relaunch app and all should work fine)
I posting this answer for those who want it to get it working without unlinking their app from Firebase Crashlytics.
To Achieve this they have to do following,
Add fabric API key back in AndroidManifest as metadata.
<meta-data
android:name="io.fabric.ApiKey"
android:value="fabric_api_key"
/>
Initialize Fabric.
Fabric.with(this, new Crashlytics());
After doing these two steps Crashlytics starts working again without unlinking your app.