Android FirebaseCouldMessaging:FirebaseInstanceId后台同步失败 - SERVICE_NOT_AVAILABLE [英] Android FirebaseCouldMessaging : FirebaseInstanceId background sync failed - SERVICE_NOT_AVAILABLE

查看:3992
本文介绍了Android FirebaseCouldMessaging:FirebaseInstanceId后台同步失败 - SERVICE_NOT_AVAILABLE的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用Firebase Cloud Messaging(FCM)API在Android中进行推送通知。当我执行那个时候完美的工作,但现在它无法找到谷歌服务的服务。



错误是:


FirebaseInstanceId:后台同步失败:SERVICE_NOT_AVAILABLE,

请帮助我如何解决。

 依赖关系{
编译文件('libs / ksoap2-android-assembly -3.4.0-jar.jar')
编译'com.android.support:appcompat-v7:23.0.0'
编译文件('libs / gson-2.2.4.jar')
编译文件('libs / activation.jar')
编译文件('libs / mail.jar')
编译文件('libs / additionnal.jar')
编译' com.android.support:multidex:1.0.1'
compile'c​​om.facebook.android:facebook-android-sdk:4.14.0'
compile'c​​om.google.firebase:firebase-messaging: 9.0.2'

compile('com.google.android.gms:play-services:9.0.2'){
exclude group:play-services-wallet
排除模块:play-services-wallet
exclude group:play-services-ads
排除模块:play-services-ads
}


感谢您抽出宝贵时间阅读本文。


< d验证互联网连通性验证Android SDK工具(工具 - > Android - >验证连接是否正确) SDK管理器 - > SDK工具选项卡)具有Google Play服务的最新版本,如果不安装该软件包。
然后,如果您使用的是仿真器,请停止仿真器并重新启动它。


I have use Firebase Cloud Messaging(FCM) API for the push notification in Android. When I implemented that time perfect work but now it's can not find the Service of google play.

the error is:

FirebaseInstanceId: background sync failed: SERVICE_NOT_AVAILABLE,

Please help me how to resolve. I Have use below dependency in gradle file.

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"
    }

}

Thanks for taking the time to read this.

解决方案

  1. Verify internet connectivity
  2. Verify if the Android SDK tools(Tools -> Android -> SDK manager -> SDK tools tab) has 'Google Play services' latest version and if not install the package. Then if you are using emulator, please stop the emulator and start it again.It works

这篇关于Android FirebaseCouldMessaging:FirebaseInstanceId后台同步失败 - SERVICE_NOT_AVAILABLE的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆