Google Maps does not work after Gero APK Signed for Google Play

Asked

Viewed 1,073 times

0

Guys I have an application running Google Maps. I generated the access key (copied and pasted in xml ) right on the Console Developer website. If I generate normal apk (no signature) it works normally. After the signed apk (to post on Google Play) it no longer loads the map, the google logo appears but the map is not loaded.

I read that you need to use the same key I generated on the site on the signed apk. I just didn’t understand how to generate the key, since the key I took on the site was (copied and pasted). I’m trying to sign right into the Android Studio IDE in the Build > Generate Signed APK menu

Can someone help me solve this?

  • Generated key as release?

  • @acklay yes managed with release

  • @acklay if I generate as debug, apk works. But if I go on Google Play it says that the SHA key is different and does not let go up to replace the existing apk in gplay

  • It has to generate sha1 as a release anyway. I’ve caught a lot of it, but today I know that when it happens this is exactly because of the wrong token. Try to check exactly if you are sending as a release. Make sure you do not have two google_maps_api.xml(debug) and google_maps_api.xml(release).

  • @acklay noticed this. In mine I only have google_maps_api.xml(debug). How do I get gogole_maps_api.xml(release)? It’s the same file, just rename?

  • It is not the same file. You have to enter the folder of your project. in app/src and you will see the modes. release/debug/test etc. Ai goes into release and puts your release key. Just this and everything will work perfectly.

  • Check out my question: https://answall.com/questions/216685/howto toggle view%C3%A7%C3%A3o-de-diret%C3%B3rios-de-debug-para-release-ou-vice-versa

  • @acklay Thank you so much for your help. I gave it right, I followed what you sent me on the link, and then appeared the xml release from google. I put my key Api. I generated the file as a release and it worked. I tried it on google play and already recognized it as an update of the old apk. Thanks =D

  • https://answall.com/a/216700/130213 "This answer has solved my problem"

  • And you used the google play key instead of the Android Studio key to generate SHA1? In my case debug works, but when I copy apk to the device and install, it doesn’t work

Show 5 more comments

2 answers

1


I’ve caught enough with this issue of sending APK and not working after launched. What you should note is that there is the mode DEBUG and RELESE in the app when the project is created in Android Studio and also when a key is generated in google console, whatever the API will be used for.

What may be happening is that you are only changing the DEBUG mode API and are not changing the RELEASE mode in your application. Look at this question I asked about: How to toggle debug directory view for release, or vice versa?

Check if there are two files google_maps_api.xml(debug) and google_maps_api.xml(release) in the directory app/src and make the proper correction.

0

After reading my key.Store

keytool -list -v -keystore "%USERPROFILE%\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android

I limited access to Apis only to my launch key.

After breaking my head I discovered that there is a subscription in the portal of Google play. Manage version => Apps Subscription

inserir a descrição da imagem aqui

See that I have two restrictions added, this happened to me.

inserir a descrição da imagem aqui

Browser other questions tagged

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