Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android: Google Map v2 not showing map for release apk

Tags:

My google map app works fine on device with debug google map API KEY but when I create signed apk for my app with release google map API KEY, it does not display map. To generate release mode google API KEY , i am using SHA1 fingerprint with my keystore. And i am also defining "signing and build types" in my project Settings as explained by developer.android.com(http://developer.android.com/tools/publishing/app-signing.html).

Tried every possible solution(removing apk and than reinstalling it again, restarting the device, cleaning the project ). nothing worked. Anybody have a good solution to my problem please help. FYI Using android studios platform.

like image 343
sam2395 Avatar asked Nov 06 '14 11:11

sam2395


People also ask

Why is my map not showing?

You may need to update your Google Maps app, connect to a stronger Wi-Fi signal, recalibrate the app, or check your location services. You can also reinstall the Google Maps app if it isn't working, or simply restart your iPhone or Android phone.

How do I fix Google Maps for development purposes only?

You have to pay for every single view of your map. To fix this you have to create an account in the Google Console, enter your credit card information, select the appropriate API and get the Google Maps code for you website.


1 Answers

Maybe you have two google_maps_api.xml files, one in the app/src/debug/res/values folder and the other in the app/src/release/res/values folder, but only the debug one contains your API key.

like image 153
Arslan Anwar Avatar answered Oct 05 '22 23:10

Arslan Anwar