问题
I am trying to switch from Firebase Crash reporting to Firebase Crashlytics.
I have followed the guide here: https://firebase.google.com/docs/crashlytics/upgrade-from-crash-reporting
But during initialization the logs says:
Received null settings, skipping report submission!
And then when testing crashes:
Cannot send reports. Settings are unavailable.
Network connection is good, so no reason why it can't get settings.
Log output:
D/CrashlyticsCore: Initialization marker file created.
W/CrashlyticsCore: Received null settings, skipping report submission!
D/CrashlyticsCore: Initialization marker file removed: true
D/CrashlyticsCore: Crashlytics is handling uncaught exception "java.lang.RuntimeException: Testing crash" from thread main
D/CrashlyticsCore: Logging Crashlytics event to Firebase
D/CrashlyticsCore: No log data to include with this event.
D/CrashlyticsCore: Unable to close session. Settings are not loaded.
D/CrashlyticsCore: Opening a new session with ID 5A042DD20217-0002-4F33-A5AF620D03D1
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
D/Fabric: Falling back to Crashlytics key lookup from Manifest
D/Fabric: Falling back to Crashlytics key lookup from Strings
W/CrashlyticsCore: Cannot send reports. Settings are unavailable.
D/CrashlyticsCore: Crashlytics completed exception processing. Invoking default exception handler.
回答1:
You need to link your project to Fabric. Ignore it if you already did it. Else follow these steps
It will navigate to Fabric and follow the instructions (create an account or sign in if you already have an account). After successfully logged in to the Fabric, Next you have to link your project to Fabric for that you can use the Fabric plugin.
After installing the plugin you can open it by clicking either of the below options shown below.
And follow instructions to create the Fabric project.After that from the firebase console -> Crashlytics -> link your firebase project to Fabric project.
That's all...
回答2:
When upgrading from Fabric Crashlytics to Firebase Crashlytics I found that I needed to make sure that AndroidManifest.xml
contained this attribute from Fabric. After having correctly linked the App in Fabric with Firebase. Which you can find at https://www.fabric.io/settings/organizations,
<meta-data
android:name="io.fabric.ApiKey"
android:value="..." />
(Replacing ...
with your key)
This needs to be within the <application>
block. Once I included this the settings were detected and crashes appeared in the Firebase console, email alerts.
回答3:
In my case this same error occurred because i already had forced the crash on the device as required by setup tutorial, for a different flavor of the application.
My App has 2 flavors, so in order to successfully link flavor number 2 i had to force crash on a different simulator.
Note: The 2 flavors need to have different packages at least.
回答4:
Same happened to me. I had another flavor of the app installed, so I deleted all flavors currently installed and it worked after simulating the crash again.
来源:https://stackoverflow.com/questions/47199793/crashlytics-says-received-null-settings-skipping-report-submission