Invalid Android Map API Key

I am trying to get MapView in an android application.

I have seen many articles telling me how to get the debug.keystore fingerprint, however, when I get my information and put it online, I am told that this is not true. Something I noticed is that when I get the fingerprint, it has 20 different hexadecimal numbers, while the approximate key for input has only 16. I cut my (deleted the last 4) and it worked.

However, I put this key in my code, and when I load the activity screen, I see the grid, marker and zoom control, but there is no map. Everywhere I look, this is a key problem. I'm fine, but I need help getting a fingerprint.

** EDIT Something I just noticed is that it gives me a fingerprint like SHA1, not MD5. So how do I change this? The keyalg parameter is set to RSA, so it must defualt for MD5 ...

+4
source share
1 answer

I bet you have JDK 7. JDK 7 seems to return SHA1 fingerprint. If you want MD5 to be, drop -v there.

keytool -list -v -alias androiddebugkey...(etc)

he will return both SHA1 and MD5. Use MD5.

+14
source

Source: https://habr.com/ru/post/1369575/


All Articles