Crashlytics found an invalid API key - AndroidStudio build

前端 未结 9 1682
挽巷
挽巷 2020-12-09 14:39

I saw all other questions, but none of accepted answers is working for me.

By following integration steps found here https://dev.twitter.com/twitter-kit/android/int

相关标签:
9条回答
  • 2020-12-09 14:55

    I also experienced this issue and it took a while for me to realize I forgot adding the following line into the app/build.gradle:

    apply plugin: 'com.google.gms.google-services'
    

    After adding it, it started working like a charm even without <meta-data> in manifest and/or app/fabric.properties file.

    0 讨论(0)
  • 2020-12-09 14:58

    Works fine added this on fabric.properties like this:

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

    Add on .gitignore (for open source projects)

    REMOVE entry on AndroidManifest.xml:

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

    Oficial documentation: https://docs.fabric.io/android/fabric/settings/working-in-teams.html

    0 讨论(0)
  • 2020-12-09 15:01

    You just forgot to add one line, in app-level gradle file.

    apply plugin: 'com.google.gms.google-services'
    

    this happens because when you are adding firebase:crashlytics, firebase document not have this line. so you need to add it manually. see this is firebase:crashlytics document photo.

    0 讨论(0)
  • 2020-12-09 15:03

    after adding file fabric.properties, getting error as below.

    Crashlytics found an invalid API key: null. Check the Crashlytics plugin to make sure that the application has been added successfully! Contact support@fabric.io for assistance.

    We need to register app and verify SHA-1 for same. Add firebase: add google-services.json file from firebase console to your /app folder of your application.(follow steps given by Firebase Console-> Add Firebase to your Android app ) It's not giving error now

    0 讨论(0)
  • 2020-12-09 15:08

    This happened to me when I updated Android Studio from 3.2 to 3.3, to fix it I just updated the

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

    to

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

    And it worked again

    0 讨论(0)
  • 2020-12-09 15:08
    <meta-data android:name="com.crashlytics.ApiKey" 
               android:value="YOUR_API_KEY"/>
    

    Add this one on Android manifest.xml here you get the api key https://www.fabric.io/kits/android/crashlytics/install

    0 讨论(0)
提交回复
热议问题