Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android Invalid Map API Key

I'm trying to get a MapView going in an Android app.

I've seen many articles telling me how to get the debug.keystore fingerprint, however when I get mine and put it in online i'm told it is invalid. Something that I noticed is that when I get the fingerprint, it has 20 different hex numbers, whereas the example key to enter has only 16. I shortened mine (removed 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, my marker and the zoom controls, but no map. Everywhere I look says this is a problem with the key. I'm fine with that, but I need some help in getting the fingerprint then.

**EDIT Something that I just noticed is that it is giving me the fingerprint as SHA1 rather than MD5. So how do I switch that up? The keyalg parameter is set to RSA, so it should defualt to MD5...

like image 956
Sababado Avatar asked Dec 10 '22 06:12

Sababado


1 Answers

I'm willing to bet that you have JDK 7. JDK 7 seems to be returning the SHA1 finger print. If you want the MD5 has, throw a -v in there.

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

it'll return both SHA1 and MD5. Use the MD5.

like image 97
Otra Avatar answered Dec 27 '22 21:12

Otra