FirebaseCloudMessaging:FirebaseInstanceId 后台同步失败 - SERVICE_NOT_AVAILABLE

7 浏览
0 Comments

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日
0
0 Comments

你可以进行检查

  1. 使用没有代理和开放式的网络连接检查您的Internet连接
  2. 用新的替换您的google-service.json,您可以在Firebase控制台中获取此文件
  3. 请检查您的设备是否已安装Google Play服务并且是否可用,否则Firebase将不会工作

检查-FireBaseInstanceId服务未注册

0
0 Comments

    \n

  1. 验证互联网连接。
  2. \n

  3. 验证Android SDK工具(工具-> Android-> SDK管理器-> SDK工具选项卡)是否具有“Google Play服务”的最新版本,如果没有则安装该软件包。然后,如果您正在使用模拟器,请停止模拟器并重新启动它。这样就能够解决问题。
  4. \n

0