Published App on Play Store can't communicate with Google Maps API and Facebook API

With inspiration from @Andy Developer, I could display the map after my app was uploaded to Google Play. These were the steps:

  1. Upload your app to Google Play (signed APK file)
  2. After the app has been submitted and approved, select your app from Google Play Console
  3. Go to Development Tools -> Release management -> App signing

App Signing in Google Play Console

  1. Copy the first SHA-1 certificate which Google Play has issued after uploading the app.
  2. Go to Google Console and select your project.
  3. Select your API-key, restrict your key, and paste the SHA-1 after package name.

Paste SHA-1 into Google Console

  1. Press Save, wait a couple of mins. and your app should show Google Maps.

Here is the answer for why you can't see the Google Map.

I recently Upload the APK on Google Play store and I faced the same issue after checking the Play Console I found the solution for this problem.

Their is no problem with your key but the problem is with your SHA-1. You signed your APK with your SHA-1 that is fine and then upload the APK it also fine.

But as per the new update for Play Console when you signed your APK with SHA-1 and upload the APK it only signed by you but as per the new update it is also signed by Google Play for more security. Have a look here some part of Google Play section:

With Google Play App Signing: You sign your app with your upload key. Then, Google verifies and removes the upload key signature. Finally, Google re-signs the app with the original app signing key you provided and delivers your app to the user.

You can refer Documentation here.

Now, The Answer of your question is After successfully upload the APK you can see that in the section with Two SHA-1 the 1st SHA-1 is Google created its own and 2nd SHA-1 is its yours.

So just copy the Google SHA-1 and paste it to your console where you generate the Google Map API Key.


I finally solved, the problem was probably that the file google_maps_api.xml provided by the api was not loaded in the release, so i

i did like that:

buildTypes {
    debug {
        manifestPlaceholders = [mapsKey: "AIzaSyB8o9KzQ5YN8U8AFS************"]
    }
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        manifestPlaceholders = [mapsKey: "AIzaSyApLacqgkdIR7uEpcf*****************"]
    }
}

and then in my AndroidManifest

<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="${mapsKey}" />

Reference: https://stackoverflow.com/a/33917692/3235560

then i registered 2 different keys each with the right sha1 fingerprint, one debug and the other given by Google Play console (not the upload certificate, but the other one generated by Google).

Very Very thanks to Zuhad and Andy Developer for inspiration.