I'm trying to implement Firebase Cloud Messaging (FCM) in my application. I added following dependency in Build.gradle and tried to build a release build variant.
compile 'com.google.firebase:firebase-messaging:15.0.0'
Build.gradle
dependencies {
compile 'com.google.firebase:firebase-core:15.0.0'
compile 'com.google.firebase:firebase-messaging:15.0.0'
}
apply plugin: 'com.google.gms.google-services'
Once I tried to build a 'debug' variant it worked fine and Firebase messaging works without any errors. But when I try to build 'release' built varient it outputs following error.
Warning:com.google.firebase.messaging.zza: can't find referenced class android.graphics.drawable.AdaptiveIconDrawable
Can anyone help me with this. Really appreciate your comments. Thanks
Add this progurd rule in
progurd-rules.pro
-dontwarn com.google.firebase.messaging.**
generate the SHA key in release mode and then add it in the firebase and then again download the json file and replace it with your old one in application.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With