错误getGoogleAppId失败,状态为:10 Android KitKat - GCM和Google云端硬盘

Mar*_*l60 8 android google-cloud-messaging android-studio google-drive-android-api

我在三星Galaxy S4 mini中运行它.KitKat Android.

在应用程序中,我使用GCM进行消息传递和Google Drive API.我认为我得到的错误来自GCM,但我不确定.

这是LogCat:

I/PersonaManager? getPersonaService() name persona_policy
I/GMPM? App measurement is starting up
I/PersonaManager? getPersonaService() name persona_policy
I/MainActivity? onCreate
E/GMPM? getGoogleAppId failed with status: 10
E/GMPM? Uploading is not possible. App measurement disabled
I/PersonaManager? getPersonaService() name persona_policy
Run Code Online (Sandbox Code Playgroud)

我不明白的是GMPM在哪里启动?在我的代码之前,我不会激活Google云端硬盘或GCM.您可以看到GMPM甚至在我的MainActivity之前启动,所以我不确定如何调试它?

我的应用运行正常.它仍然连接到GCM,仍然可以接收消息.仍然连接到Google云端硬盘.仍然检索文件.

但这个错误令我担心.有谁知道它是什么原因,或者我怎么去调试它?

Bob*_*der 9

我在启用了Google云端硬盘和Google Analytics的应用中看到了相同的错误日志.尽管有错误消息,但这些功能似乎工作正常.当我开始尝试添加GCM时,我配置并安装了一个新google-services.json文件.之后错误消息消失了.尝试刷新google-services.json文件.这适用于@MrsEd(请参阅上面的问题评论).