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:
- Xamarin.GooglePlayServices.Base
- Xamarin.Firebase.Messaging
I have tried:
- deleting the bin and obj folder and building the solution again
- updating all the same family nugget packages to the same version