Reputation: 1717
I'm dealing with an strange issue. I've followed multiple threads from forums here and nothing helped. We are developing an Android application where we use Google Maps API v2. We are using Android Studio. My collegue has registered our project on Google Developers Console, activated Google Maps API for the project and created new public key for the application. Then he registered that key in our AndroidManifest.xml file:
<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="OUR_KEY_VALUE" />
and it works perfectly fine for him when he debugs the application in Android Studio on his mobile. The problem is that I have the same source code as he has and when I debug or run our app on my mobile phone, the map we are using is blank and is not showing the map. Interesting thing is that if my collegue send me the app-debug.apk file generated during Android Studio's build and I install it everything work ok and the map is there. Also when this .apk file is installed on different phones it works fine. When I generate the app-debug.apk file using Android Studio and try to install it on my phone, map is not showing.
We even created the release key for our app and it works exactly the same.
What could be the cause that we both cannot debug the application working with the same API's key? Thanks for your help!
Upvotes: 1
Views: 2519
Reputation: 75629
You must register all keys of all of your team members. Google API Console allows to put many packages/keys per Google Maps Key. Just ask all members for their debug certificate and add new entry <PRINT>:<PACKAGE ID>
per each developer. It's not true that all devs must share debug certificate. This is wrong! You need just to register each of your devs with the Google API console. That way you can easily disable developer access if i.e. he leave the company.
Upvotes: 2
Reputation: 7929
For future users:
The debug/release keystore
used to generate Google API Key
must be the same when you debug/run your app.
Upvotes: 0