我一直在尝试生成用于在 windows7 上使用谷歌地图 v2 的 sha1 密钥。运行以下命令后根据谷歌文档:
keytool -list -v -keystore "C:\Users\your_user_name\.android\debug.keystore" -alias androiddebugkey -storepass android -keypass android
Alias name: androiddebugkey
Creation date: Jan 01, 2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 4aa9b300
Valid from: Mon Jan 01 08:04:04 UTC 2013 until: Mon Jan 01 18:04:04 PST 2033
Certificate fingerprints:
MD5: AE:9F:95:D0:A6:86:89:BC:A8:70:BA:34:FF:6A:AC:F9
SHA1: BB:0D:AC:74:D3:21:E1:43:07:71:9B:62:90:AF:A1:66:6E:44:5D:75
Signature algorithm name: SHA1withRSA
Version: 3
我的输出:
Alias name: androiddebugkey
Creation date: 12-Jun-2013
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=Android Debug, O=Android, C=US
Issuer: CN=Android Debug, O=Android, C=US
Serial number: 57376504
Valid from: Wed Jun 12 16:22:47 BST 2013 until: Fri Jun 05 16:22:47 BST 2043
Certificate fingerprints:
MD5: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
SHA1: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Signature algorithm name: SHA256withRSA
Version: 3
Extensions:
#1: ObjectId: 2.5.29.14 Criticality=false
SubjectKeyIdentifier [
KeyIdentifier [
0000: 5D 1C 48 72 D9 E2 F0 1A 12 CE 97 CC 1F DA DD F6 ].Hr............
0010: C9 D0 1E 62 ...b
]
]
但在我的情况下,输出是相似的,但除了。
Signature algorithm name:SHA256withRSA
有人可以告诉我如何使用 SHA1withRSA 生成密钥。问这个问题的原因是当我试图在我的 android 应用程序中使用谷歌地图 v2 时。显示以下错误。我猜 SHA256withRSA 可能是导致此错误的原因。几天以来我一直遇到授权失败。如果有人可以帮助我,那就太好了.. 谢谢..
Authorization failure. Please see https://developers.google.com/maps/documentation/android/start for how to correctly set up the map.