简体   繁体   中英

Firebase Crashlytics Invalid Key Error

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:

  1. Check Android Studio version, suggested version is 3.1.4.
  2. 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'

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM