After updating various dependencies, I received a Crashlytics error during compilation: "Crashlytics detected an invalid API key: null. Check the Crashlytics plugin to make sure the application was successfully added! Contact support@fabric.io for help. 'The only non-automatic answer, which I received from repeated attempts to support@fabric.io, which the error directs you to, was that Fabric and Crashlytics are separate commands, so they could not help me. I avoided introducing an additional Fabric layer in Crashlytics and could not get new key from the Fabric site or even make the site recognize me. Trying to get around this by simply removing Crashlytics from my code, I got "By default, FirebaseApp does not initialize com.example.app in this process. Be sure to call FirebaseApp.initializeApp (Context) first 'runtime failure.
I never had to add the initialization string 'FirebaseApp.initializeApp (this)', and in fact it was commented out. The documentation even mentions that this is not necessary if only to use Firebase for one action. Adding didn't matter, still got a kill start error.
It turns out that the cause of the new obscure errors was the updated google-services dependency. At the moment, I donβt have time to spend more days trying to fix the gun errors caused by the new addiction, so until someone finds a solution, I will stick to the old version. In addition to the strange initialization failure, the new version may force Fabric users to crashlytics. To do this, users are also forced to revert to the old version of the dependency: Crashlytics detected an invalid API key: null. after updating com.google.gms: google-services: 4.1.0
com.google.gms:google-services:4.1.0//BAD com.google.gms:google-services:4.0.1//GOOD
EDIT 10/17/18: after updating the following dependencies again
implementation 'com.google.firebase:firebase-ads:17.0.0' implementation 'com.google.firebase:firebase-auth:16.0.4' implementation 'com.google.firebase:firebase-database:16.0.3' implementation 'com.google.firebase:firebase-core:16.0.4
I got an immediate crash when trying to install with "xxx unexpectedly closed", such as when I tried to update the google-services dependency. Rummaging through the magazine, I found a link telling me to add this to the manifest
<meta-data android:name="com.google.android.gms.ads.APPLICATION_ID" android:value="ca-app-pub-xxxxxx~xxxxxx"/>
This is new and not mentioned in the installation and implementation instructions here https://firebase.google.com/docs/android/setup and here https://developers.google.com/admob/android/interstitial .
Previously, I had to deal with only one identifier associated with advertising for my application, INTERSTITIAL_UNIT_ID. Now you need to deal with two. In addition to the above addition, the documentation instructs you to add here ADMOB_APP_ID (the same number that you associate with ads.APPLICATION_ID in the new manifest code)
MobileAds.initialize(this, ADMOB_APP_ID);
The identifiers INTERSTITIAL_UNIT_ID and ADMOB_APP_ID can be found in the Google AdMob console. My game application stopped showing ads when I first updated Firebase dependencies and still does not show ads, giving an error code 0 in
public void onAdFailedToLoad(int errorCode){...
Even after all this mess added, I still cannot update the google-services dependency without failing to start an initialized error. I expect to get stuck in google-services: 4.0.1 for a while.
EDIT 24/24/18: from mobileadssdk-advisor+support@google.com after several weeks of correspondence stating that the ad is not showing after the updates:
βThank you for exchanging device logs. From logs, this looks like an existing problem, and it is on our priority list, and our team is working on a fix, and this only happens on Android O and P devices.β
Only O and P devices? It was the last two versions of O that were released on September 25, 2017.