【发布时间】:2020-12-20 15:14:35
【问题描述】:
我正在使用 Firebase Cloud Messaging 实现推送通知,为此我在我的 AndroidManifest.xml 文件中添加了此代码
<!--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-->
但是当我尝试运行应用程序时,它甚至在启动活动之前就抛出了应用程序
Java.Lang.NoClassDefFoundError: 'Failed resolution of: Lcom/google/android/datatransport/runtime/dagger/internal/Factory;'
顺便说一句,我已经为此功能安装了两个 NuGet 包:
- Xamarin.GooglePlayServices.Base
- Xamarin.Firebase.Messaging
我试过了:
- 删除 bin 和 obj 文件夹并重新构建解决方案
- 将所有相同的家庭块包更新到相同的版本
【问题讨论】:
标签: java c# xamarin.android firebase-cloud-messaging android-manifest