android - 我如何在 Android 中修复 SERVICE_NOT_AVAILABLE

标签 android firebase firebase-cloud-messaging

我想将 firebase 添加到我的应用程序中,并使用以下路径添加了 firebase:Tools -> Firebase
但是当运行应用程序时,在日志中显示这个错误:

03-30 16:33:14.741 1457-1575/com.example.mohammad.a1_firstfirebase W/GooglePlayServicesUtil: Google Play services out of date.  Requires 10084000 but found 6599430
03-30 16:33:14.742 1457-1457/com.example.mohammad.a1_firstfirebase W/FA: Service connection failed: ConnectionResult{statusCode=SERVICE_VERSION_UPDATE_REQUIRED, resolution=null, message=null}
03-30 16:33:34.846 1457-2691/com.example.mohammad.a1_firstfirebase D/FirebaseInstanceId: background sync failed: SERVICE_NOT_AVAILABLE, retry in 60s

我添加了这个依赖:

{
      classpath 'com.google.gms:google-services:3.0.0'

     compile 'com.google.firebase:firebase-messaging:10.0.1'
}

apply plugin: 'com.google.gms.google-services'

我该如何解决这个问题?我需要这个帮助,请帮助我

最佳答案

将 google-services.json 文件添加到您的资源文件

关于android - 我如何在 Android 中修复 SERVICE_NOT_AVAILABLE,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43117449/

相关文章:

firebase - Flutter/Firebase 如何增加应用程序图标的徽章编号

android - AudioRecord 和 AudioTrack 回声

android - RecyclerView NotifyItemInserted

android - 以编程方式具有两个主题的一项 Activity

flutter - 尝试分配新值时,无法将元素类型 'int' 分配给映射值类型 'FieldValue'

python - 在 flask 中发送帖子请求

android - 如何在已经包含 ScrollView 的 Android 应用程序上添加更多按钮?

java - boolean 值和 Firebase 数据库

javascript - 使用 Firebase 云函数执行基本计算

firebase - FCM 数据消息 : need to send JSON array in place of String value