Android: Google Map v2 Key: Not working on different systems

1.6k views Asked by At

I am developing one Map Android project. I have generated one Android Google Map V2 API key , I have followed this

https://developers.google.com/maps/documentation/android/start#get_an_android_certificate_and_the_google_maps_api_key

for obtaining Android Map key. I have given my SHA-1 fingerprint and my application package name. Through this I have generated one Map Key. The Problem is this key is only for my system. It wont run it in another systems and says Authentication failure.

Is there any option to generate universal Map key so that it can run in all environments?

We have 10 people working in that project, all of them having the API key the same way i get it.So Now we have 10 different API keys If I plan to launch the app in play store , Which key should I use?

Please provide me the best way to do this.

4

There are 4 answers

0
Akhilesh Dhar Dubey On

Actually this happens because of SHA-1 key and it is related to debug.keystore file which it found in android folder. There are two option, either you create different map key from that system using SHA-1 and replace that Map key in manifest.xml file or you can just copy debug.keystore file from system and replace it to that system.

0
Batuhan Coşkun On

If you generate debug api-key, you must use debug.keystore file to attain sha1. Then you can generate your api-key and you can use it on your own system. For other systems, your workmates each must generate api-key with their own sha1 fingerprints.

When you decide to publish your apk to google play, this debug api-key will not work. You should first sign your apk and create yourapp.keystore file. Then you can find sha1 for this private keystore file. After that operation this api-key won't work on debug mode. But you can copy apk file that you signed after your edits to your device. After downloading the app from apk file, you will see that your api-key works. But release api-key is useless on debug mode.

Finally, you should all generate different api-keys for each systems on debug mode.

0
nitesh goel On

this is related to SHA-1 key . you can build the apk file from your system only . but you can run the apk file on any system. and also you can add multiple SHA-1 key in google console.one more thing you can do is create a keystore from eclipse and add the sha-1 for this do google console . now sign apk with this . And you are ready to go.

0
GrIsHu On

Maps API keys are linked to specific certificate/package pairs, rather than to users or applications.

As your SHA1 key is related to your system's debug.keystore file and it changes from the system to system and your google map key is also related to SHA1 key and you application package name.

So to run your google Map in another system you have to generate another for the map by taking the SHA1 key from the system .