rodly
rodly

Reputation: 149

Google Maps not displaying in release build

I'm getting this error: Failed to connect to Google API client: ConnectionResult{statusCode=API_UNAVAILABLE, resolution=null}

Not sure what I'm doing wrong. I have two SHA-1 fingerprints (one from debug keystore, one from the release keystore) in the Android app within the Google API's console.

The map displays fine in debug mode however.

Basically I did everything in this document so far: https://developers.google.com/maps/documentation/android/start#get_an_android_certificate_and_the_google_maps_api_key

Upvotes: 1

Views: 1710

Answers (1)

bwegs
bwegs

Reputation: 3767

If it's working in the debug version and not the release version it may be that you forgot to change the API key in your manifest file. Make sure that the API key you're using in your AndroidManifest.xml file is the same one that is associated with the Google Developer's Console that corresponds with the Release version of your application and not the debug version.

This is the line in your manifest that I'm referring to:

<meta-data
android:name="com.google.android.maps.v2.API_KEY"
android:value="API_KEY"/>

Upvotes: 1

Related Questions