Crashlytics found an invalid API key: null. after updated com.google.gms:google-services:4.1.0

和自甴很熟 提交于 2019-12-03 00:27:20

Try adding this to manifest

<meta-data
    android:name="com.google.android.gms.ads.APPLICATION_ID"
    android:value="ca-app-pub-xxxxxx~xxxxxx"/>

See my related answer to Default FirebaseApp is not initialized for more details.

Try adding following dependency

implementation 'com.google.firebase:firebase-crash:16.2.1'

In my case, the error was produced because I was picking the wrong APK file. You should pick the debug apk (app-debug.apk) instead of the app-name.apk.

You need to add the meta data for the fabric in AndroidManifest.xml

<meta-data
android:name="io.fabric.ApiKey"
android:value="xxx6c41xxx6ec601xxxd4xxxa2" />

Be guided that the best way is stated below:

Add the Fabric API key to your fabric.properties: apiKey=fabric_api_key

# Fabric properties file: app/fabric.properties
apiSecret=xx68f6074dxxxxxc11dxxx97c172e8ebf0
apiKey=xxxe75b4xxxx97e8cxxxx0135e9d46f5a2xxx

Official documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!