我正在使用Firebase崩溃报告和Firebase远程配置,但我没有使用Firebase云消息传递。两者的版本是9.8.0。
所以,我不明白为什么我在日志中看到这个错误:
java.lang.SecurityException: Not allowed to start service Intent { act=com.google.android.c2dm.intent.REGISTER pkg=com.google.android.gms (has extras) } without permission com.google.android.c2dm.permission.RECEIVE
at android.app.ContextImpl.startServiceCommon(ContextImpl.java:1266)
at android.app.ContextImpl.startService(ContextImpl.java:1243)
at android.content.ContextWrapper.startService(ContextWrapper.java:588)
at com.google.firebase.iid.zzf.zzb(Unknown Source)
at com.google.firebase.iid.zzf.zza(Unknown Source)
at com.google.firebase.iid.zzf.zzb(Unknown Source)
at com.google.firebase.iid.zzf.zza(Unknown Source)
at com.google.firebase.iid.zzd.zzc(Unknown Source)
at com.google.firebase.iid.zzd.getToken(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceId.getToken(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceId.zzaae(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceIdService.zza(Unknown Source)
at com.google.firebase.iid.FirebaseInstanceIdService.zzm(Unknown Source)
at com.google.firebase.iid.zzb$2.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)
可能是,因为我依赖Google Cloud Messaging(但不使用 - 库依赖 - 内部公司库)?
是否有任何严重后果?
答案 0 :(得分:1)
如Doug Stevenson在this groups post中所述,Analytics,崩溃报告和远程配置需要RECEIVE,C2D_MESSAGE和WAKE_LOCK权限。
主要用途是生成安全令牌,在WAKE_LOCK的情况下,通过让Android在能够传输收集的数据之前杀死应用程序的进程来防止数据丢失。