Invalid Crashlytics API Key error when upgrading to Android Gradle Plugin 3.3.0
Asked Answered
R

3

13

After upgrading from Android Gradle Plugin 3.2.0 to 3.3.0-alpha13, I'm seeing the following build error:

> Task :app:fabricGenerateResourcesDebug FAILED
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.

It appears that the processDebugGoogleServices task is no longer running before the fabricGenerateResourcesDebug task.

I'm on version 4.1.0 of the Google Services plugin and 1.25.4 of the Fabric plugin.

Radiobiology answered 2/10, 2018 at 18:9 Comment(1)
Check my answer on this similar question.Lombok
C
25

This is a known incompatibility with the v4.1.0 plugin and AGP 3.3 alpha versions. The workaround is to downgrade to v4.0.2 of the google-services plugin. More discussion and details may be found here: https://github.com/firebase/quickstart-android/pull/661.

Coremaker answered 2/10, 2018 at 18:19 Comment(1)
4.2.0 + AGP 3.3.0 is not working in my specific build for some reason. Reverting to 4.0.2 works, though. :/Aught
P
19

google-services 4.2.0 also fixes the problem.

platforms/android/build.gradle

classpath 'com.google.gms:google-services:4.1.0'

to

classpath 'com.google.gms:google-services:4.2.0'

solve the issue

Perfectionist answered 24/4, 2019 at 10:23 Comment(0)
M
0

In my case update of google-services solve the issue

classpath 'com.google.gms:google-services:4.1.0'

to

classpath 'com.google.gms:google-services:4.3.2'
Mccormac answered 13/9, 2019 at 12:43 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.