获取谷歌地图API密钥 [英] Obtaining Google Maps API key
问题描述
我使用的是Windows 7操作系统。
I'm using Windows 7.
我已经试过几次与出现在c debug.keystore:\\用户\\ YOURUSER.android \\使用命令:
I have tried several times with the debug.keystore with appears in c:\users\YOURUSER.android\ using the command:
keytool -list -alias androiddebugkey -keystore c:\Users\YOURUSER\.android\debug.keystore -storepass android -keypass android
它给了我一个MD5,后来我去谷歌MD5注册页面,它最高审计机关是不是一个有效的指纹。
It gives me a MD5, but then I go to Google MD5 registration page and it sais it is not a valid fingerprint.
我寻找更多的信息,我终于创建了一个新debug.keystore到C:\\用户\\ YOURUSER \\以避免改写原来的。我用这个命令:
I searched for more information, and I finally created a new debug.keystore into c:\users\YOURUSER\ to avoid rewriting the original one. I used this command:
keytool -genkey -keypass android -keystore c:\users\YOURUSER\debug.keystore -alias androiddebugkey -storepass android -validity 10000 -dname "CN=Android Debug,O=Android,C=US"
它的工作原理,所以我用了previous命令获取MD5,它给了我一个新的MD5。然后我去谷歌再次与同样的问题:不是一个有效的指纹
It works, so I use the previous command to get the MD5, and it gives me a new MD5. Then I go to Google again and the same problem: "not a valid fingerprint".
在我做了第二次尝试。这是我做的,则:
1)开了Windows7的终端,就到C:\\ Program Files文件\\的Java \\ jdk1.7.0 \\ BIN \\
2)写命令:
The I made a second attempt. This is what I did then: 1) Opened a Windows7 terminal, went to c:\program files\java\jdk1.7.0\bin\ 2) Wrote command:
keytool -genkey -v -keystore c:\eclipse\my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000
3)然后我试图从我的密钥库获得MD5 code,使用COMAND:
3) Then I tried to get the MD5 code from my keystore, using comand:
keytool -list -alias alias_name -keystore c:\eclipse\my-release-key.keystore
和写作问我的密码。它给了我一个MD5。
and writing the password I am asked. It gives me a MD5.
4)我去地图API密钥注册和写入MD5。 指纹无效
4) I go to maps api key sign up and write the MD5. "FINGERPRINT NOT VALID"
我不知道是什么问题。而我应该为每一个应用程序我做到这一点?真是让人头疼!
I don't know what the problem is. And I am supposed to do this for every app I program? What a headache!
任何人能帮助我吗?
推荐答案
你确定你得到的MD5,而不是SHA1指纹? Tryed -v选项?
请参见:<一href=\"http://stackoverflow.com/questions/6305938/how-can-i-get-the-md5-fingerprint-from-javas-keytool-not-only-sha-1\">How我能得到的MD5指纹从Java的keytool,不仅SHA-1?
Are you sure you get the MD5 and not the SHA1 fingerprint? Tryed the -v option? see: How can I get the MD5 fingerprint from Java's keytool, not only SHA-1?
这篇关于获取谷歌地图API密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!