Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firebase Crashlytics invalid api KEY AndroidX Gradle 3

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 [email protected] 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.

like image 349
Maurice Avatar asked Dec 05 '25 07:12

Maurice


1 Answers

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.

like image 88
etrado Avatar answered Dec 07 '25 20:12

etrado



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!