In my app, I use maps to show the current position. Then, I use Google Maps Android API v2 (I don’t use Google Maps API) to add this functionality to my app.
When I am developing my app in eclipse everything is OK. I create an Android key with the debug keystore and I use it in the manifest, I can execute my app well and I can move and use the map. In this case I have no log errors (only the typical “The Google Play services resources were not found. Check your project configuration to ensure that the resources are included”).
Now when I upload my app to the Google Play Developer Console, in beta testing it works, but when I go publish, the map gets grey background and doesn’t work. Log gives me this error:
09-23 14:05:46.475: E/Google Maps Android API(5485): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
09-23 14:05:46.475: E/Google Maps Android API(5485): Ensure that the following correspond to what is in the API Console: Package Name: gc.yy.xxxx, API Key: AIza*******************************RDEI, Certificate Fingerprint: 472D********************************7218 (keystore use to sign the package)
Then I decide to use in my eclipse project that keystore, so I create a new Android key (47:2D:*************************:72:18;gc.yy.xxxx gives me AIza*****************Qm4Q key) and I paste it in the manifest file. I run the project and I get once again the grey background. Log gives me this error:
09-23 14:10:45.307: E/Google Maps Android API(5585): Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.
09-23 14:10:45.317: E/Google Maps Android API(5585): Ensure that the following correspond to what is in the API Console: Package Name: gc.yy.xxxx, API Key: AIza*******************************Qm4Q, Certificate Fingerprint: CC4B********************************A917 (debug keystore)
I don’t know if the problems concerns to the keystore. I use debug.keystore with my map (I can’t use another one, I don’t know if it’s not possible) and I use a keystore I create to sign my app package. It seems an infinite loop of no useful API keys…
Thanks in advance!
EDIT: I finally solved it by adding the 2 meta-data blocks of each API key, that is to say, my manifest was like this:
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIza*******************************RDEI" />
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="AIza*******************************Qm4Q" />
And finally, I have my app in Google Play! :)