问题
I am running this in a Samsung Galaxy S4 mini. KitKat Android.
In the application, I use both GCM for messaging, and Google Drive API. I think the error I am getting is from GCM, but I am not sure.
Here is 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
What I don't understand is where does GMPM start up? I don't activate Google Drive or GCM until after this in my code. You can see that GMPM starts even before my MainActivity, so I'm not sure how to debug it?
My application is running fine. It still connects to GCM, still receives messages OK. Still connects to Google Drive. Still retrieves files.
But this error has me worried. Does anyone know what causes it, or how I can go about debugging it?
回答1:
I was seeing the same error logs in an app that has Google Drive and Google Analytics enabled. Those capabilities appeared to be working fine, despite the error messages. When I started experimenting with addition of GCM, I configured and installed a new google-services.json
file. The error messages disappeared after that. Try refreshing your google-services.json
file. This worked for @MrsEd (see comment above on question).
回答2:
I was facing the same issue.
I was using:
compile 'com.google.android.gms:play-services:8.0.1'
When I changed it to the latest one, it started working. In my case it was
compile 'com.google.android.gms:play-services:9.2.1'
回答3:
getGoogleAppId failed with status: 10
Uploading is not possible. App measurement disabled
Happens if you have an app that queries the Google License server but does not have the credentials to run and the License check fails.
For instance,
- running a licensed app on an unlicensed device.
- During development of a paid app on multiple devices, or emulators, where the device does have a "paid for" Google License.
回答4:
What i did was just open the google app on your phone and check if u have it updated and also created a account with it .. Once you have this done it will work
来源:https://stackoverflow.com/questions/33531689/error-getgoogleappid-failed-with-status-10-android-kitkat-gcm-and-google-driv