0

所以我在 AndroidHive 教程的帮助下在我的应用程序中实现了 GCM。

推送消息过去在我的三星 Galaxy S3 和 Nexus 7 设备上都可以使用。但现在推送通知仅在我的三星 Galaxy s3 上有效,并且它给我的 Nexus 7 带来了错误。我的 Nexus 7 不想再注册了。当我尝试注册我的 Nexus 7 时,我得到了这个:

    01-01 07:46:33.396: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:33.396: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:33.396: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:33.426: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-1
01-01 07:46:33.426: E/GCMRegistrar(10980): internal error: retry receiver class not set yet
01-01 07:46:33.426: V/GCMRegistrar(10980): Registering receiver
01-01 07:46:33.436: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:33.436: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:33.436: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:33.446: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 1573 (3000)
01-01 07:46:33.466: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:34.796: D/dalvikvm(10980): GC_CONCURRENT freed 212K, 5% free 8010K/8376K, paused 1ms+3ms, total 20ms
01-01 07:46:34.976: D/dalvikvm(10980): GC_CONCURRENT freed 273K, 6% free 8159K/8592K, paused 3ms+3ms, total 24ms
01-01 07:46:35.026: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.gcm.intent.RETRY
01-01 07:46:35.026: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:35.026: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:35.036: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-2
01-01 07:46:35.036: V/GCMRegistrar(10980): Registering app com.toviehd.remake of senders 725930664821
01-01 07:46:35.046: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:35.146: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:35.146: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:35.146: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:35.176: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-3
01-01 07:46:35.176: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:35.176: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:35.176: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:35.186: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 5157 (6000)
01-01 07:46:35.196: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:35.996: D/dalvikvm(10980): GC_CONCURRENT freed 359K, 6% free 8220K/8736K, paused 3ms+4ms, total 22ms
01-01 07:46:36.116: D/dalvikvm(10980): GC_CONCURRENT freed 332K, 7% free 8332K/8868K, paused 3ms+3ms, total 24ms
01-01 07:46:40.346: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.gcm.intent.RETRY
01-01 07:46:40.346: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:40.346: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:40.356: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-4
01-01 07:46:40.356: V/GCMRegistrar(10980): Registering app com.toviehd.remake of senders 725930664821
01-01 07:46:40.366: V/GCMBaseIntentService(10980): Releasing wakelock
01-01 07:46:40.466: V/GCMBroadcastReceiver(10980): onReceive: com.google.android.c2dm.intent.REGISTRATION
01-01 07:46:40.466: V/GCMBroadcastReceiver(10980): GCM IntentService class: com.toviehd.remake.GCMIntentService
01-01 07:46:40.466: V/GCMBaseIntentService(10980): Acquiring wakelock
01-01 07:46:40.476: V/GCMBaseIntentService(10980): Intent service name: GCMIntentService-725930664821-5
01-01 07:46:40.486: D/GCMBaseIntentService(10980): handleRegistration: registrationId = null, error = SERVICE_NOT_AVAILABLE, unregistered = null
01-01 07:46:40.486: D/GCMBaseIntentService(10980): Registration error: SERVICE_NOT_AVAILABLE
01-01 07:46:40.486: I/GCMIntentService(10980): Received recoverable error: SERVICE_NOT_AVAILABLE
01-01 07:46:40.486: D/GCMBaseIntentService(10980): Scheduling registration retry, backoff = 8885 (12000)
01-01 07:46:40.496: V/GCMBaseIntentService(10980): Releasing wakelock

我真的不知道我做了什么来打破这个......任何帮助将不胜感激

4

1 回答 1

4

它必须使用日期时间设置。平板电脑上的日期是过去的。我认为 GCM 无法同步到过去或其他东西。我在平板电脑上重置了时间,它又可以工作了!!

于 2012-12-06T22:45:37.750 回答