2017-01-09 111 views
0

我正在使用Firebase崩潰報告和Firebase遠程配置,但我沒有使用Firebase雲消息傳遞。兩者的版本是9.8.0。雖然我沒有使用Firebase雲消息傳遞,但缺少雲消息傳遞權限

所以,我不明白爲什麼會出現這個錯誤日誌:

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) 

莫非,因爲我依賴於谷歌雲端通訊(但不使用 - 庫的依賴 - 公司內部的圖書館)?

它有什麼嚴重的後果嗎?

回答

1

正如Doug Stevenson在this groups post中提到的那樣,Analytics,Crash Reporting和Remote Config需要RECEIVE,C2D_MESSAGE和WAKE_LOCK權限。

主要用途是生成安全令牌,在WAKE_LOCK的情況下,通過阻止Android在能夠傳輸收集數據之前終止應用程序的進程來防止數據丟失。

相關問題