I am implementing push notifications using Firebase Cloud Messaging, for this I added this code in my AndroidManifest.xml file
<!--FCM RECEIVER-->
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdInternalReceiver"
android:exported="false"/>
<receiver
android:name="com.google.firebase.iid.FirebaseInstanceIdReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE"/>
<action android:name="com.google.android.c2dm.intent.REGISTRATION"/>
<category android:name="${applicationId}"/>
</intent-filter>
</receiver>
<!---FCM RECEIVER ENDS HERE-->
but when I try to run the application, it throws the application even before starting the activity
Java.Lang.NoClassDefFoundError: 'Failed resolution of: Lcom/google/android/datatransport/runtime/dagger/internal/Factory;'
By the way, I had Installed two NuGet Packages for this functionality:
I have tried:
Installing the Xamarin.Google.Dagger package solved this problem for me.
Just Install the package Xamarin.Google.Dagger. That should do the trick. Seems it's trying to look for the package but doesn't find it.
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