当我使用GCM Service
的Android应用程序收到Firebase
推送时,我会收到以下信息:
W / Bundle:关键google.sent_time预期String但值为a
java.lang.Long中。返回了默认值<null>
。
我知道它们是不同的服务,但应用程序能够接收推送通知,我在网上找不到有关此错误日志的任何信息。
为什么我会收到此java.lang.ClassCastException
?
11-10 10:51:33.536 31712-31712/abcd.com.abcd E/FirebaseInstanceId: Failed to resolve target intent service, skipping classname enforcement
11-10 10:51:33.536 31712-31712/abcd.com.abcd E/FirebaseInstanceId: Error while delivering the message: ServiceIntent not found.
11-10 10:51:33.546 31712-32529/abcd.com.abcd W/Bundle: Key google.sent_time expected String but value was a java.lang.Long. The default value <null> was returned.
11-10 10:51:33.546 31712-32529/abcd.com.abcd W/Bundle: Attempt to cast generated internal exception:
java.lang.ClassCastException: java.lang.Long cannot be cast to java.lang.String
at android.os.BaseBundle.getString(BaseBundle.java:921)
at com.google.android.gms.gcm.zza.zzae(Unknown Source)
at com.google.android.gms.gcm.GcmListenerService.zzo(Unknown Source)
at com.google.android.gms.gcm.GcmListenerService.zzn(Unknown Source)
at com.google.android.gms.gcm.GcmListenerService.zzm(Unknown Source)
at com.google.android.gms.gcm.GcmListenerService.zza(Unknown Source)
at com.google.android.gms.gcm.GcmListenerService$1.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1112)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:587)
at java.lang.Thread.run(Thread.java:818)
11-10 10:51:33.546 31712-32529/abcd.com.abcd D/abcd: GCMBroadcastReceiver - Push received!
Obs:“abcd”正在取代我们的包描述。