【发布时间】:2021-03-09 22:35:06
【问题描述】:
我们正在尝试在 xamarin 表单项目中集成到 Azure 通知中心。添加了以下 nuget 包并实现了类,但在运行应用程序时,出现以下错误。我们没有使用任何代码压缩器,但仍然出现此错误。任何帮助将不胜感激。
-
Xamarin.GooglePlayServices.Base
-
Xamarin.Firebase.Messaging
-
Xamarin.Azure.NotificationHubs.Android
''Java.Lang.RuntimeException: '无法获取提供者 com.google.firebase.provider.FirebaseInitProvider: com.google.firebase.components.MissingDependencyException: 组件 Component{1, type=0, deps=[Dependency{anInterface=class com.google.firebase.FirebaseApp, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.installations. FirebaseInstallationsApi, type=required, direct=true}, Dependency{anInterface=class com.google.firebase.iid.FirebaseInstanceId, type=required, direct=true}, Dependency{anInterface=interface com.google.firebase.platforminfo.UserAgentPublisher, type=required, direct=true}, 依赖{anInterface=interface com.google.android.datatransport.TransportFactory, type=optional, direct=true}, 依赖{anInterface=interface com.google.firebase.heartbeatinfo.HeartBeatInfo, type=必需,direct=true}]}:接口 com.google.firebase.installations.FirebaseInst allationsApi''
【问题讨论】:
-
根据您的报错信息,您可能错过了azure hub的一些配置,请先查看Configure the Android application for notifications。
标签: firebase xamarin.forms xamarin.android azure-notificationhub