GCM Google Play库IllegalArgumentException服务未注册

时间:2015-08-06 12:29:14

标签: google-cloud-messaging google-play-services

我正在尝试将GCM(Google云消息传递)整合到我的应用中。自从将GCM库添加到我的Android Studio项目中以来,我随机时间频繁地发现应用程序崩溃,并使用以下日志:

java.lang.IllegalArgumentException: Service not registered: com.google.android.gms.common.internal.zzl$zzb$zza@423bc838
        at android.app.LoadedApk.forgetServiceDispatcher(LoadedApk.java:926)
        at android.app.ContextImpl.unbindService(ContextImpl.java:1485)
        at android.content.ContextWrapper.unbindService(ContextWrapper.java:508)
        at com.google.android.gms.common.stats.zzb.zza(Unknown Source)
        at com.google.android.gms.common.internal.zzl$zzb.zzcd(Unknown Source)
        at com.google.android.gms.common.internal.zzl.handleMessage(Unknown Source)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:137)
        at android.app.ActivityThread.main(ActivityThread.java:5103)
        at java.lang.reflect.Method.invokeNative(Native Method)
        at java.lang.reflect.Method.invoke(Method.java:525)
        at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:737)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:553)
        at dalvik.system.NativeStart.main(Native Method)

以下是我在gradle中的依赖项:

dependencies {
compile project(':viewpagerindicator')
compile 'com.google.http-client:google-http-client-gson:1.20.0'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.google.guava:guava:14.0.1'
compile 'joda-time:joda-time:2.3'
compile('com.google.android.gms:play-services-gcm:7.5.0')

compile files('libs/google-api-client-1.16.0-rc.jar')
compile files('libs/google-api-client-android-1.16.0-rc.jar')
compile files('libs/google-http-client-android-1.16.0-rc.jar')
compile files('libs/greendao-1.3.0-beta-1.jar')
compile files('libs/guice-4.0-beta4-no_aop.jar')
compile files('libs/javax.inject.jar')
compile files('libs/jsr305-1.3.9.jar')
provided "org.projectlombok:lombok:1.12.6"}

有什么想法吗?谢谢。

0 个答案:

没有答案