如何创建密钥库? [英] How can I create a keystore?

查看:125
本文介绍了如何创建密钥库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为Android创建密钥库(在eclipse环境中)的步骤是什么?
我需要在我的应用程序中使用谷歌地图,我不知道我错过了什么步骤。
请提供具体的详细步骤(我从指南中不明白)。

What are the steps to create a keystore for android (in an eclipse environment)? I need to use google maps in my app and I don't know what steps I missed. Please provide me with the specific detailed steps (I didn't understand it from the guides).

推荐答案

回答标题中的问题,您可以使用随附的任何标准JDK发行版的Java Keytool实用程序创建密钥库,并且可以位于%JAVA_HOME%\bin 。在Windows上,这通常是 C:\Program Files\Java\jre7\bin

To answer the question in the title, you create a keystore with the Java Keytool utility that comes with any standard JDK distribution and can be located at %JAVA_HOME%\bin. On Windows this would usually be C:\Program Files\Java\jre7\bin.

所以在Windows上,打开一个命令窗口并切换到该目录并输入这样的命令

So on Windows, open a command window and switch to that directory and enter a command like this

keytool -genkey -v -keystore my-release-key.keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 10000

Keytool提示您为密钥库提供密码,提供可分辨名称字段,然后提供密钥的密码。然后,它在您所在的目录中生成一个名为my-release-key.keystore的文件。密钥库和密钥由您输入的密码保护。密钥库包含单个密钥,有效期为10000天。别名是您在以后使用的名称,在签署您的应用程序时引用此密钥库。

Keytool prompts you to provide passwords for the keystore, provide the Distinguished Name fields and then the password for your key. It then generates the keystore as a file called my-release-key.keystore in the directory you're in. The keystore and key are protected by the passwords you entered. The keystore contains a single key, valid for 10000 days. The alias is a name that you — will use later, to refer to this keystore when signing your application.

有关Keytool的更多信息,请参阅以下文档: http://docs.oracle.com/javase/6/docs/technotes/tools/ Windows / keytool.html

For more information about Keytool, see the documentation at: http://docs.oracle.com/javase/6/docs/technotes/tools/windows/keytool.html

,有关签署Android应用程序的更多信息,请访问: http://developer.android.com/tools/publishing/app-signing.html

and for more information on signing Android apps go here: http://developer.android.com/tools/publishing/app-signing.html

这篇关于如何创建密钥库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆