The default FCM icon of the Android manifest is not used. Instead the Android standart icon is used. In the logcat it says:
E/FirebaseMessaging: Icon with id: 2131230849 uses an invalid gradient. Using fallback icon.
The default icon only contains one color. I tested it with multiple different icons but always the Android standart icon is used.
Your icon have to be .png with transparent background, converted from vector graphics editor(AI, Sketch), or, more better, it should be .svg Just try to convert your .png icon in drawable resources with http://romannurik.github.io/AndroidAssetStudio web-service. It have to help to solve your problem, or if not, you have to redraw your icon.
UPDATE: fixed by firebase in version 12.0.0
The faulty code below has been updated with this and it works great on 8.0, while preventing the bug outlined in my original answer.
This doesnt solve the issue, but from the comments I was asked to put it as an answer. Here is the code from firebase 11.8.0 that is the culprit and only on Android 8.0 (API 26). The reason for this check is because there is an Android 8.0 notification bug with adaptive icons https://www.bleepingcomputer.com/news/mobile/android-oreo-adaptive-icons-bug-sends-thousands-of-phones-into-infinite-boot-loops/ so this code prevents that, but in doing so, also prevents non-adaptive icons from showing up properly
I've noticed in my logcat, that my app hits this code twice per notification, it tries for my notification drawable which i set in the manifest as per Firebase's instructions, then hits it again trying to do it for the launcher icon. Both fail, even when I make them solid color drawables.
As per another comment from southrop, the firebase team is aware of the issue and working on a fix but no timeline given.
This code is not in 11.6.0 and lower, so if you really need this working for the time being, downgrade your firebase.
Hope this helps others who find this post searching for the error
Fixed with v12.0.0: https://firebase.google.com/support/release-notes/android#20180320
This bug happens only if your application targeting API 26 (or greater) and you use Firebase 11.8.0 and launching it on device with Android 8.0. So I decided to fix it only for these version. The workaround: You should override Application class and override it's getResources() to return patched Resources class:
And you should create patched for our purposes Resources class:
And check that your AndroidManifest.xml contains this meta-data:
If you will do as described all notifications on Android 8.0 that will be rendered by Firebase SDK will be shown with default icon @drawable/ic_firebase_notification
But I hope that Firebase team fix their harmfull check and read how it's works
What's the version of the android studio? Android studio work with new icon design feature starts from Android Studio 3.0. If you are using android studio 3.0 or above go to the drawable folder and call context menu to add new vector or image asset. Look for the legacy tab, which is the same setting or feature of the earlier version of android studio.