2016-11-15 3 views
4

私はFCMメッセージを使用してAndroidエミュレータデバイスに通知を送信しようとしていますが、通知を受け取っていません。Firebaseメッセージング非アクティブ、AppMeasurementServiceからの切断

D/FA:

V/FAリモートサービスに接続:処理がサービスをキューに入れられ GoogleのアプリケーションIDはGoogleの-services.json

の内側に、これは私はコンソールから得るものであることと同じですタスク:1

V/FA:非アクティブ、AppMeasurementService

から切断私のbuild.gradle(モジュール:アプリ):

android { 
    compileSdkVersion 23 
    buildToolsVersion "23.0.1" 
    defaultConfig { 
     applicationId "com.example.cris.firebasenotificationexam" 
     minSdkVersion 22 
     targetSdkVersion 23 

....

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

誰もがこの問題を解決する方法を知っていますか?

+0

あなたが提供した詳細で何が原因かを判断するのは難しいです。 'onMessageReceived()'実装とサンプルペイロードを投稿できますか? –

答えて

0

ログメッセージ:非アクティブで、AppMeasurementServiceとの接続が切断されていますは、問題であれば正常であり、表示されません。

編集しbuild.gradleファイルの依存関係のブロック:Firebase Setup Guide

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

// Moved the following statement. Was in the dependencies block 
apply plugin: 'com.google.gms.google-services' 

詳細。

また、ライブラリの最新リリース版の使用を検討してください。firebase-messagingの場合は9.8.0、appcompat-v7の場合は25.0.1です。

関連する問題