Reputation: 503
How do I get a release key for Google Maps? I used my current key with a debug.apk and a signed-release.apk, and the maps dont render on the release.apk, so I assume its a API key issue.
All the answers for this question on SO date back to 2013/14 and this page is completely silent on the issue.
Upvotes: 4
Views: 4988
Reputation: 2534
From How to configure Google Maps API keys for Android by Dragana Vucic:
Go to Google API Console -> APIs & Services -> Credentials and click on Create Credentials -> API key. This option will generate a key that is not restricted to anything (yet).
After these steps, the google map service will work for the published application.
Upvotes: 1
Reputation: 21
Just add string not from resources(@string/google_maps_key), but hardcode.
<meta-data
android:name="com.google.android.geo.API_KEY"
android:value="AIza..." />
Upvotes: 2
Reputation: 7947
The same way you get a "debug" key. There is no real difference, just as there is no real difference between a debug and a release certificate in Android (except that the debug certificate gets created automatically for you and resides in your Android settings folder).
Get the SHA-1 fingerprint for your Android release key and use it along with the proper package name (debug builds usually have a ".debug" attached, so make sure to omit that) to create a new Google Maps Key in the Google Developer Console.
Upvotes: 2
Reputation: 27221
https://console.developers.google.com/apis/dashboard
https://console.developers.google.com/apis/credentials/oauthclient?
AndroidManifest.xml
file.That's it!
More detailed:
https://developers.google.com/maps/documentation/android-api/config?hl=en
Upvotes: 1