如何查找我的 Android 应用程序的 MD5 指纹
我正在尝试注册 Android Google 地图,它要求 MD5 指纹。如何从我的应用程序中获取指纹?
我是密钥库的新手,无法理解我在网上找到的东西。非常简单的说明,
谢谢提前致谢
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我正在尝试注册 Android Google 地图,它要求 MD5 指纹。如何从我的应用程序中获取指纹?
我是密钥库的新手,无法理解我在网上找到的东西。非常简单的说明,
谢谢提前致谢
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(7)
对于 Windows 用户:如果遇到问题,请确保周围没有其他 debug.keystore 文件。我按照说明进行操作,但只有当我发现我的 Eclipse 安装使用位于此处的不同 debug.keystore 时才设法让它工作:
android-sdk-windows.android
(不是我的 Windows 用户目录中的那个)
For Windows Users: If you have problems, make sure there are no other debug.keystore files around. I followed the instructions, but only managed to get it to work when I discovered my Eclipse installation was using a different debug.keystore located here:
android-sdk-windows.android
(not the one in my Windows User directory)
您将需要两个密钥库。
一个用于调试目的,
一个用于发布目的。
当您通过 eclipse 开发应用程序并在模拟器或设备上调试它时。您将需要调试密钥库。否则你将看不到地图。
调试密钥库已存在于您的系统中。
尝试在
打开控制台/终端到上面存在 debug.keystore 文件的位置找到它们并执行
输出将类似于(在询问密码时只需按 Enter 键)
复制此 MD5 指纹值并转到
http://code.google.com/android/maps-api-signup.html
成功注册后您将获得地图密钥。将它们放入视图的 MapView 元素中。
对于发布,
您需要生成自己的密钥库,并需要获取相同的映射密钥。
否则,您将无法在将 apk 部署到设备上时看到地图。
创建您自己的新密钥库,并对生成的密钥库执行相同的过程。
生成密钥库也很容易。
我只需通过 eclipse 导出我的 Android 应用程序,然后它会自行完成所有操作。
希望它有帮助:)
You will be needing two keystores.
One for debug purpose and
One for release purpose.
While you are developing your application via eclipse and debugging it on simulator or device. You will be needing debug keystores. Otherwise you will not be able to see the map.
debug keystore is already present into your system.
Try finding them at
Open console/terminal on to the above location where debug.keystore file is present and execute
Output will be like (press simply enter when password is asked)
Copy this MD5 fingerprint value and go to
http://code.google.com/android/maps-api-signup.html
You will get Map Keys On successful signup. Put those in the MapView Element of your view.
For release
You need to generate your own keystore and need to get Map keys for the same.
else you will not be able to see map on deployment of your apk onto the device.
Create a new keystore of your own and follow the same procedure for the generated keystore.
Its very easy to generate keystore also.
I simply export my android application via eclipse and it then do everything by itself.
Hope it helps :)
http://code.google.com/android/add -ons/google-apis/mapkey.html#getfingerprint
如果您正确遵循此操作,您应该能够获取您的 MD5 指纹。有说明在签名时和签名后获取指纹。
如果您已经签署:
您首先需要使用命令提示符导航到自动创建的配置文件 android 文件夹中的调试密钥库,如链接中所述。然后,您可以粘贴此内容(不带美元符号)并在命令提示符中运行它:
否则,您可以使用命令提示符导航到 Java SDK 文件夹中的 jarsigner 并使用它:
按照提示符说明进行操作后,您应该收到您的 MD5
http://code.google.com/android/add-ons/google-apis/mapkey.html#getfingerprint
If you follow this correctly, you should be able to get your MD5 fingerprint. There are instructions to both get your fingerprint at the time of signing as well as afterwards.
If you've signed already:
You would first use your command prompt to navigate to your debug keystore in your automatically made profile android folder as described in the link. You would then paste this (without the dollar sign) and run it in your command prompt:
Otherwise, you can use your command prompt to navigate to your jarsigner in your Java SDK folder and use this:
After following the on prompt instructions, you should receive your MD5
任何来这里寻找
YouTube OAuthAPI 的 MD5 或 SHA1 的人都是这个命令:
这个 cmd:
debug.keystore 的默认密码是 android
取自
YouTube API
Anyone coming here looking for the
MD5 or SHA1 for the YouTube OAuthAPI this is the command:
This cmd:
The default password for the debug.keystore is android
Taken from
YouTube API
哇,我永远不会得到上面的答案,不得不阅读一本最终清晰的教程!
调试密钥库的文件名是 debug.keystore。这是 Eclipse 用于签名的证书
您的应用程序,以便它可以在 Android 模拟器或设备上运行。
使用调试密钥库,您需要使用 Keytool.exe 应用程序提取其 MD5 指纹
包含在您的 JDK 安装中。申请免费 Google 地图需要此指纹
钥匙。
您通常可以在 C:\Program Files\Java\\bin 中找到 Keytool.exe
发出以下命令(参见图 9-4)来提取 MD5 指纹:
keytool.exe -list -alias androiddebugkey -keystore
“C:\Users\.android\debug.keystore” -storepass android
-keypass Android
Wow I would have never gotten it with the answers above, had to read a book tutorial which is CLEAR finally!
The filename of the debug keystore is debug.keystore. This is the certifi cate that Eclipse uses to sign
your application so that it may be run on the Android Emulator or devices.
Using the debug keystore, you need to extract its MD5 fi ngerprint using the Keytool.exe application
included with your JDK installation. This fi ngerprint is needed to apply for the free Google Maps
key.
You can usually find the Keytool.exe in the C:\Program Files\Java\\bin
folder.
Issue the following command (see Figure 9-4) to extract the MD5 fi ngerprint:
keytool.exe -list -alias androiddebugkey -keystore
“C:\Users\.android\debug.keystore” -storepass android
-keypass android
2015 更新:
确保您当前位于终端中的
jdk/bin
对于 Linux 或 OS X,打开终端窗口并输入以下内容:
对于 Windows Vista 和 Windows 7 ,运行:
如果您成功完成上述步骤,您将得到:
2015 Update:
Make sure your are currently in
jdk/bin
in your terminalFor Linux or OS X, open a terminal window and enter the following:
For Windows Vista and Windows 7, run:
If you are successful in above step you will get:
以下内容或许可以帮助您:
The following may be able to help you: