I have a problem with my google maps API. In debug mode it's working fine. But when in release mode i got blank maps. i have tried to change SHA1 from debug keystore to release keystore. any idea for my problem?
I have a problem with my google maps API. In debug mode it's working fine. But when in release mode i got blank maps. i have tried to change SHA1 from debug keystore to release keystore. any idea for my problem?
In case someone is facing the same issue, I will share my solution... I am creating an app and I finally got at the point to release it. So I tried to run on the release mode and I got the information that I needed to set the signingConfigs for the build variants release. Once I did it, and configured my proguard-rules.pro file the app was running, great! but the map wasn't showing.
I found people talking about the keystore and SHA1 credentials end everything but it wasn't clear for me yet. So I recorded that I has to set a key to make my map work on the build variants debug and everything came together.
So what I learned is that debug and release uses different SHA1 credentials and a Key can have more than one credential related to it. When I set the key for the google maps following this link https://developers.google.com/maps/documentation/android-sdk/get-api-key I got the SHA1 credential for the debug, so to make my map work I had to get my SHA1 credential from release and add it to my key at the...
Google Cloud Platform Console > "Select Your Project" > "Click on the Hamburger Icon on the Top Left" > APIs & Services > Credentials > "Click on your credential used for the debug mode" > Restrict usage to your Android apps > "add the new SHA1 credential from release mode"
Now the point is, how to get my SHA1 credential from release mode? If you have already set you signingConfigs for the build variants release you probably got a keystore.jks file. With this file you can get your credential by going to your bash and type..
keytool -list -v -keystore YOUR.PATH.TO.THE.KEYSTORE.FILE -alias YOUR.KEYSTORE.ALIAS
Then they will ask you the keystore password and done! Now you can copy and paste your SHA1 credential from release mode to your key at the Google Cloud Platform Console. =)