FirebaseCloudMessaging:FirebaseInstanceId 后台同步失败 - SERVICE_NOT_AVAILABLE
FirebaseCloudMessaging:FirebaseInstanceId 后台同步失败 - SERVICE_NOT_AVAILABLE
我在安卓开发中使用Firebase Cloud Messaging(FCM)API推送通知。当我实现它的时候,它的完美工作,但现在找不到Google Play服务。
错误是:
FirebaseInstanceId: background sync failed: SERVICE_NOT_AVAILABLE,
请帮我解决。我在gradle文件中使用了下面的依赖项。
dependencies { compile files('libs/ksoap2-android-assembly-3.4.0-jar.jar') compile 'com.android.support:appcompat-v7:23.0.0' compile files('libs/gson-2.2.4.jar') compile files('libs/activation.jar') compile files('libs/mail.jar') compile files('libs/additionnal.jar') compile 'com.android.support:multidex:1.0.1' compile 'com.facebook.android:facebook-android-sdk:4.14.0' compile 'com.google.firebase:firebase-messaging:9.0.2' compile('com.google.android.gms:play-services:9.0.2') { exclude group: "play-services-wallet" exclude module: "play-services-wallet" exclude group: "play-services-ads" exclude module: "play-services-ads" } }
感谢您抽出时间阅读此内容。
admin 更改状态以发布 2023年5月21日
你可以进行检查
- 使用没有代理和开放式的网络连接检查您的Internet连接
- 用新的替换您的
google-service.json
,您可以在Firebase控制台中获取此文件 - 请检查您的设备是否已安装Google Play服务并且是否可用,否则Firebase将不会工作