Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/

后端 未结 13 1784
失恋的感觉
失恋的感觉 2020-12-04 17:41

I am trying out the new Firebase/Crashlytics setup and seem to run into a weird issue.

  • I have one Android code base with multiple product flavors and each flav
相关标签:
13条回答
  • 2020-12-04 18:22

    I posting this answer for those who want it to get it working without unlinking their app from Firebase Crashlytics.

    To Achieve this they have to do following,

    Add fabric API key back in AndroidManifest as metadata.

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

    Initialize Fabric.

    Fabric.with(this, new Crashlytics());
    

    After doing these two steps Crashlytics starts working again without unlinking your app.

    0 讨论(0)
  • 2020-12-04 18:23

    You probably forgot to add:

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

    To your Manifest file. At least in my case, that was the reason.

    0 讨论(0)
  • 2020-12-04 18:23

    In my case, the location of meta-data:io.fabric.ApiKey was wrong.

    • app/src/main/AndroidManifest.xml

    before

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

    after

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

    I hope this will be of some help.

    0 讨论(0)
  • 2020-12-04 18:25

    I came across this issue in the new Firebase SDK upgrade to 17.0.0+ version.

    The issue was caused when we use multiple flavors. In case you are using a separate flavor - debug and have it linked to firebase as well, instead of adding the google-services.json file to the app root, we have to add the flavor specific json file to the appropriate folder for the flavor - app -> src -> (flavor folder).

    This will ensure that the generated code has the correct client id for the flavor.

    This is a silly mistake but there are chances for people to miss it.

    0 讨论(0)
  • 2020-12-04 18:25

    At First you have to enable the Crashlytics in the Crashlytics tab in your project in the console (before or after adding all the dependencies of crashlytics) or follow these steps present in this link:
    https://firebase.google.com/docs/crashlytics/get-started?authuser=0&platform=android

    0 讨论(0)
  • 2020-12-04 18:27

    Go to the settings of the project and add SHA-1 key for your android app. After that redownload google-service.json to your sources. This causes disappearing of this error

    E/Fabric: Failed to retrieve settings from https://settings.crashlytics.com/spi/v2/platforms/android/apps/package name/settings
    

    And after quite a huge delay you'll see crashes in Firebase Console.

    By the way this doesn't help me with apps that were registered under one Google account, and after that moved to another account. Wiating for a response of Firebase team about this issue.

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