邀请ID不能为空

时间:2015-12-14 07:27:55

标签: android google-play-services parcelable

我的日志中有一个奇怪的错误报告。以下是堆栈跟踪:

Fatal Exception: java.lang.IllegalArgumentException: Invitation id can not be empty.
       at android.os.Parcel.readException(Parcel.java:1550/1559/1544/1603)
       at android.os.Parcel.readException(Parcel.java:1499/1505/1493/1552)
       at com.google.android.gms.internal.zzkn$zza$zza.zza(Unknown Source)
       at com.google.android.gms.internal.zzkk.zzgh(Unknown Source)
       at com.google.android.gms.internal.zzkj$zzd.zza(Unknown Source)
       at com.google.android.gms.internal.zzkj$zzd.zza(Unknown Source)
       at com.google.android.gms.internal.zzlx$zza.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmd.begin(Unknown Source)
       at com.google.android.gms.internal.zzmd.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmi.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmg.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmg.zza(Unknown Source)
       at com.google.android.gms.internal.zzme.zzpi(Unknown Source)
       at com.google.android.gms.internal.zzme.begin(Unknown Source)
       at com.google.android.gms.internal.zzmi.zza(Unknown Source)
       at com.google.android.gms.internal.zzlz.onConnected(Unknown Source)
       at com.google.android.gms.common.internal.zzj$zzg.zzk(Unknown Source)
       at com.google.android.gms.common.internal.zzj$zza.zzqv(Unknown Source)
       at com.google.android.gms.common.internal.zzj$zza.zzqv(Unknown Source)
       at com.google.android.gms.common.internal.zzj$zzc.zzqx(Unknown Source)
       at com.google.android.gms.common.internal.zzj$zzb.handleMessage(Unknown Source)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:135/211/145/148)
       at android.app.ActivityThread.main(ActivityThread.java:5294/5373/5835/5417)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904/1020/1399/726)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:699/815/1194/616)

我添加了大量的堆栈跟踪变量,其中只是行号不同,因为不同的Android版本。我正在使用播放服务,版本8.3.0。如果您有任何想法,请留下答复或评论。由于该消息Invitation id can not be empty在Google上搜索时未返回任何结果。

请不要太快关闭,因为我想在Google+bug tracker上将其关联以获取Google的反馈。

1 个答案:

答案 0 :(得分:3)

我刚检查了一些崩溃日志,发现了这个:

Fatal Exception: java.lang.RuntimeException: Unable to start receiver my.package.name.ReferralReceiver: java.lang.IllegalArgumentException: Invitation id can not be empty.
       at android.app.ActivityThread.handleReceiver(ActivityThread.java:2680)
       at android.app.ActivityThread.access$1700(ActivityThread.java:156)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1428)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:211)
       at android.app.ActivityThread.main(ActivityThread.java:5373)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)
Caused by java.lang.IllegalArgumentException: Invitation id can not be empty.
       at android.os.Parcel.readException(Parcel.java:1559)
       at android.os.Parcel.readException(Parcel.java:1505)
       at com.google.android.gms.internal.zzkn$zza$zza.zza(Unknown Source)
       at com.google.android.gms.internal.zzkk.zzgh(Unknown Source)
       at com.google.android.gms.internal.zzkj$zzd.zza(Unknown Source)
       at com.google.android.gms.internal.zzkj$zzd.zza(Unknown Source)
       at com.google.android.gms.internal.zzlx$zza.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmd.begin(Unknown Source)
       at com.google.android.gms.internal.zzmd.zzb(Unknown Source)
       at com.google.android.gms.internal.zzmd.begin(Unknown Source)
       at com.google.android.gms.internal.zzmi.zza(Unknown Source)
       at com.google.android.gms.internal.zzmg.zza(Unknown Source)
       at com.google.android.gms.internal.zzkj.convertInvitation(Unknown Source)
       at my.package.name.ReferralReceiver.onReceive(ReferralReceiver.java:72)
       at android.app.ActivityThread.handleReceiver(ActivityThread.java:2673)
       at android.app.ActivityThread.access$1700(ActivityThread.java:156)
       at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1428)
       at android.os.Handler.dispatchMessage(Handler.java:102)
       at android.os.Looper.loop(Looper.java:211)
       at android.app.ActivityThread.main(ActivityThread.java:5373)
       at java.lang.reflect.Method.invoke(Method.java)
       at java.lang.reflect.Method.invoke(Method.java:372)
       at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1020)
       at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:815)

导致此堆栈跟踪中的异常的代码行是这样的:

AppInvite.AppInviteApi.convertInvitation(getApiClient(), invitationId);

所以我猜这是相关的,崩溃是由空invitationId引起的。我添加了一个空检查,让我们看看这次崩溃是否会再次出现。