Blank MapView on Android for Standalone After Publishing

It did! My MapView is now working as intended

1 Like

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.

5 Likes

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

2 Likes

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.

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!

THANK YOU!!

This worked, it was driving me crazy

Thanks for saving us. I was facing the same issue from last 3 days. Your answer just saved me. Thanks a lot :slight_smile:

Thank you so much! You’re a life-saver :smiley: