Google Maps does not load on the physical device

Asked

Viewed 567 times

0

I created a Google Maps study application and in the Genymotion emulator it loads normally but on a physical device it does not load completely (I’m using Android Studio). Follow a screen print of how it looks on a physical device:inserir a descrição da imagem aqui

To generate the AI-Key, I extracted the SHA-1 fingerprint using the following command: keytool -list -v -keystore "C:\Users\menda\Desktop\Meus APKs\Chaves\googlemaps2.jks" -alias googlemaps -storepass 123456 -keypass 123456

I exported the project signed with the "debug.Keystore" and I’m still unable to load Google Maps on a physical device (the emulator works perfectly). Follow the prints of the steps I did:inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

inserir a descrição da imagem aqui

  • It is difficult to give an opinion on this type of situation! From the image it seems to me that you do not have a valid key. For when there is no connection, the quadrants are still displayed. Create the key and leave SHA-1 values and the app package blank to see if it works! Hugs

  • Thiago, at https://console.developers.google.com I created a new API-Key with the package name and SHA-1 values blank. The map in this way is also shown as in the image above. You know where I am failing?

  • If installing the apk you exported in genymotion works? Or just running direct?

  • Emerson, in Android Studio if I run the project through Genymotion, the map is uploaded. If in Android Studio in the Build>Generate Signed APK menu create an apk file to install on a physical device, the map on the physical device is not loaded...

  • I must be making some kind of mistake regarding the keys! What is the difference between Keystore and Key password?

  • If I through the Android Device Monitor send the APK file to the emulator Genymotion and then in this proceed to its installation, happens the same problem as on the physical device, that is, in this way the map also is not loaded!!!

  • I do not know what can be, the prints seem to be right. I recommend creating a Keystore and use it both to debug and to export the apk.

  • Emerson, I did what you recommended but it didn’t work, that is, in the menu Build>Generate Signed APK, I created a new key and captured its SHA-1 value with the following command "keytool -list -v -Keystore "%USERPROFILE%. android chavetestes1.jks" -alias chavetestes1 -storepass 123456 -keypass 123456" and on console.developers.google.com created a new API-Key to apply to my project. I installed it on a physical device and it still doesn’t work!!?? Could you send me an apk of a your testing project for me here to confirm if it works? Thank you.

Show 3 more comments

2 answers

2


I was able to figure out what my problem was: I to export the APK file to a physical device could not insert the API-Key in the "google_maps_api.xml" file. I had it before inserting it directly into the "Androidmanifest.xml" file, overriding the configuration: <meta-data android:name="com.google.android.geo.API_KEY" android:value="@string/google_maps_key" /> for

<meta-data
        android:name="com.google.android.geo.API_KEY"
        android:value="xxx_minha_api_key_xxx" />

Thank you to everyone who tried to help me.

-1

For the signed apk mode on google play, you should go Builds variants (left of screen) and change from debug to release mode.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.