Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/179.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/firebase/6.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android Firebase云消息未收到通知_Android_Firebase_Google Cloud Messaging_Firebase Cloud Messaging - Fatal编程技术网

Android Firebase云消息未收到通知

Android Firebase云消息未收到通知,android,firebase,google-cloud-messaging,firebase-cloud-messaging,Android,Firebase,Google Cloud Messaging,Firebase Cloud Messaging,我对安卓系统的开发还很陌生。我最近学习使用Firebase云消息。我以前测试过它是否有效。现在它不起作用了。我想知道这是否是FCM不起作用的原因 上个月,我发布了我的应用程序live,其中包含 compile 'com.google.firebase:firebase-messaging:9.0.0' 我在几个设备上进行了测试,firebase控制台可以成功地向所有设备发送通知 一周前,我注意到有9.0.2版本,但我还没有发布带有这个新依赖项的应用程序。谷歌推出新版本firebase mess

我对安卓系统的开发还很陌生。我最近学习使用Firebase云消息。我以前测试过它是否有效。现在它不起作用了。我想知道这是否是FCM不起作用的原因

上个月,我发布了我的应用程序live,其中包含

compile 'com.google.firebase:firebase-messaging:9.0.0'
我在几个设备上进行了测试,firebase控制台可以成功地向所有设备发送通知

一周前,我注意到有9.0.2版本,但我还没有发布带有这个新依赖项的应用程序。谷歌推出新版本firebase messaging时,所有运行旧依赖项的设备都无法接收通知,这是真的吗

dependencies {
        compile fileTree(include: ['*.jar'], dir: 'libs')
        testCompile 'junit:junit:4.12'
        compile 'com.android.support:appcompat-v7:23.4.0'
        compile 'com.android.support:design:23.4.0'
        compile 'com.google.firebase:firebase-messaging:9.0.0'
    }
apply plugin: 'com.google.gms.google-services'

请检查您的控制台,如果它显示类似的消息

W/GooglePlayServicesUtil: Google Play services out of date.  Requires xxxxxxx but found yyyyyyy
然后你需要更新你的谷歌服务
由于应用程序使用新版本的Firebase,且play services的版本较旧,因此需要对其进行更新,否则设备将不会收到通知并显示为“未注册”

但应将当前代码添加到问题中。不工作是否意味着设备不会收到任何通知?发送通知时是否从服务器收到任何错误?没有设备接收通知消息库的新版本不应导致以前的版本停止工作。9.0.0仍应按预期工作。您是如何确认设备未接收到数据的?另外,请包括您用于发送通知的请求以及您收到的响应。您是否解决了此问题?