I am trying to add Firebase crashlytics to our project but just can not get it to work.
I have followed the instructions adding the necessary lines to our gradle file but no success so far.
The main issue I get is this message: Crashlytics found an invalid API key: null
which seems weird since I thought an API key should not be needed for Firebase.
I use Android studio 3.0.1 with the latest gradle plugin. My project is Ionic based but I have tried to hand modify the gradle file as well with the same results.
I had a similar problem and it turned out that I did not apply google-services plugin in the bottom of build.gradle (in app module)
apply plugin: 'com.google.gms.google-services'
After that it is working
There is an incompatibility with some other Firebase libraries that add the API key in the manifest for you, for example com.firebaseui:firebase-ui-auth:2.3.0
You can check with the Merged Manifest in Android Studio, to see if that is the case:
The issue might be resolve by updating/removing the library if possible, otherwise you can remove the API key by adding a <meta-data>
tag with a tools:node="remove"
attribute, like this:
<manifest
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="your.package">
<application
...>
<meta-data
android:name="io.fabric.ApiKey"
tools:node="remove"/>
</application>
</manifest>
This will tell the manifest merger that you don't want this specific meta-data.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With