Blank MapView on Android for Standalone After Publishing

I can confirm that I’ve followed this. I’m currently starting the entire key signing process from the start to see if I just dropped something along the way.

1 Like

I didn’t recall doing it, but I turned on Google App Signing (located under Release management). Obviously I had to grab their app signing certificate, and not the upload certificate.

19 PM

1 Like

Did this end up solving your problem? :smiley:

It did! My MapView is now working as intended

Praise the heavens! Thanks to @jesse for the tip :slight_smile:

Hi @goldeelocks! I’m sorry, I’m also seeing my map blank in standalone app, I have enable Google App Signing, what did you do with the app signing certificate?

For the app signature, you need to get your certificates. With Google Play, they can be found here:
image

You want to use this to grab the signature and head over to: https://console.developers.google.com/apis/ and go to credentials
image

Make your API key (or, if you have one up, just click into it for details)

At the bottom, there’s an option to “restrict the key” which you want to do. Add your package name and your SHA-1 certificate

You should have a key for iOS and a key for Android. This lets you apply your restrictions separately, and manage usage more strictly. Android requires these signatures, where iOS only needs the package name.

1 Like

So, within my generated Api key in google Apis, I’ll not be using the SHA1 that I tooked from the apk using “keytool -list -printcert -jarfile …apk” (as expo says) and instead I need to use the SHA1 from App Signing?

I would add both to your list of allowed certs.

keytool shows the fingerprint associated with the apk that was built by expo. When google signs the apk, it changes the fingerprint. I allow both, so that I have API access for my dev apk as well as the one downloaded from the play store

yippie kay yay!!! thanks a lot! that did the trick

1 Like

Not working
I have generate my apk using my own keystore, generated SHA1 fingerprint, added them on api console in my key. Added the api key in app.json as per guidelines, still a blank Map in my production app.

1 Like

Are you using the key from before Google signs your app or after Google signs your app in the api?

Thanks for this @goldeelocks, I added the key from play.google to my credential in console.developer and the map started to work on Android! :raised_hands:

2 Likes

That solved my problem. Thanks!

1 Like

your tips really helped me!!!

Expo need to change the documentation. in terminal the command copies the wrong SHA-1 certificate(the wrong one is the upload certificate but the right one is to grab it as you pasted above)

thank you! solve my problem!!!

Hi @markmoo - sorry our docs are wrong :frowning_face: would you be able to point me to the place where we’re saying to copy the wrong SHA-1 certificate?

I think his point is that, since many apps are signed by Google for security reasons, there should be a note about moving to production or something.

https://docs.expo.io/versions/latest/sdk/map-view

Add your android.package from app.json (eg: ca.brentvatne.growlerprowler) to the Package name field.
Run exp fetch:android:hashes.
Copy Google Certificate Fingerprint from the output from step 9 and insert it in the “SHA-1 certificate fingerprint” field.

I’ve pushed a change to the docs that will go out when they’re next deployed.

Also, please feel free (anyone!) to send us a PR here https://github.com/expo/expo-docs if you think the docs can be improved in any way.

1 Like

Sorry to resurrect this thread, but it’s the closest I’ve seen to a decent answer.

I’ve gone through these steps…

  • Add Expo MapView
  • Enabled Maps for Android SDK (Google Dev console)
  • Entered my package name and SHA-1 fingerprint from the Play Console

It works in development, but not when I build the APK.

Please, if anyone has any more to offer, I’d be very grateful!