-1

I am developing an app, here I'm using google map in debug mode map shows correctly but in release mode map not showing and shows only current location.

By using google map API I have tried but still its not working and also I find the SHA1 by using keystore(i.e. keytool -list -v -keystore file path.jks) then also its not working.

By using following views I tried and found the SHA1 key but map not shown in app.

Release APK file not showing google maps

How do i do?

Community
  • 1
  • 1
rohiH
  • 99
  • 3
  • 14
  • You can refer this link {http://stackoverflow.com/questions/15727912/sha-1-fingerprint-of-keystore-certificate} – Kuldeep Kulkarni Sep 30 '16 at 11:30
  • 1
    I have created sha1 key using same method but when i put this sha1 to console to find google map api then map not shown in app with relsease mode and in debug mode map showing. – rohiH Sep 30 '16 at 11:37
  • Have you check my answer? – Kuldeep Kulkarni Sep 30 '16 at 11:59
  • 1
    yes i have created SHA1 key for google map api then also in relase mode map not shown – rohiH Sep 30 '16 at 12:27
  • Does this answer your question? [Android Studio - Google map still blank on real Android device on release apk](https://stackoverflow.com/questions/30559602/android-studio-google-map-still-blank-on-real-android-device-on-release-apk) – Sweta Jain Nov 10 '21 at 13:20

4 Answers4

1

Have you set your google_maps_key in both debug & release folder in google_maps_api.xml. If not please, set it. You can find both folders inside Project structure.

See image for reference.

enter image description here

Kuldeep Kulkarni
  • 796
  • 5
  • 20
  • can i create debug and release folder? im using android studio i dont have two different folders. – rohiH Sep 30 '16 at 12:25
  • From your project structure, you can find out two folders debug & release, which is created at the time of project creation. You don't need to create it. – Kuldeep Kulkarni Sep 30 '16 at 12:29
  • but in my project i have not show any folder release or debug – rohiH Sep 30 '16 at 12:31
  • In my app map doesnot shows but it takes current location of user in release mode, why map not shows i'm not getting but in debug mode map shows currectly. – rohiH Sep 30 '16 at 12:38
  • Once you can check for demo, Create new Project by File->New->New Project->Give Application Name->Next->Next->Choose Google Maps Activity->Next->Finish. You will check difference with your project. – Kuldeep Kulkarni Sep 30 '16 at 12:39
0

Generate API key access using release key-store. And set Google API console.

Surya Prakash Kushawah
  • 3,185
  • 1
  • 22
  • 42
0

Go to google API console.

  • crate new project
  • generage API key
  • enable your service
  • add API key in your project

OR

You can simply follow this developer guide LINK.

If you have troubling in getting SHA-1 key. You can easily get it by running Signing-report gradle task as below picture (in Android studio).

enter image description here

james
  • 1,967
  • 3
  • 21
  • 27
0

I solved it by looking at Google Play Console in the left menu select configuration, then integrity of the app and then copy the of the upload key certificate that is below of the SHA1 Certificate of the app signing key and add it in the same API key of Google Cloud Platform. This way I didn't have to make changes to the .

If it doesn't work for you, add both and try.

Yeheshuah
  • 1,216
  • 1
  • 13
  • 28
Julio
  • 11
  • 2