生成密钥库时遇到问题 (Java)
我正在尝试发布我的第一个 Android 应用程序,因此需要使用密钥库签署该应用程序。
起初一切都很顺利。我在命令提示符中输入以下内容:
keytool –genkey –v –keystore testKeystore.keystore –alias testKeystore –keyalg RSA –validity 10000
我回答了后面的几个问题,但在最后一个问题之后,我收到以下错误
keytool 错误: java.io.FileNotFoundException: testKeystore.keystore [访问被拒绝]
也许我正在做一些愚蠢的错误,但我遵循了互联网上的几个关于如何制作密钥库的指南,我认为这就是全部了?
I am trying to publish my first Android application, and therefore need to sign the app with a keystore.
At first everything goes well. I type the following into the command prompt:
keytool –genkey –v –keystore testKeystore.keystore –alias testKeystore –keyalg RSA –validity 10000
I answer the several questions that follow, but after the last question, I get the following error
keytool error: java.io.FileNotFoundException: testKeystore.keystore [Access is denied]
Maybe I am doing some silly mistake, but I have followed several guides on the internet on how to make a keystore, and I thought that was all there was to it?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您使用的是 Eclipse,则可以在导出向导中创建新的密钥库。双击您的 Android 清单文件,然后选择“使用导出向导”链接。
If you're using Eclipse, you can create a new keystore in the export wizard. Double click on your android manifiest file, then select the 'Use the Export Wizard' link.
使用此命令
keytool -genkeypair -alias -keystore -storepass -validity 760 -keyalg RSA -keysize 2048 -dname "CN=, OU=, O=, L=班加罗尔, ST=卡纳塔克邦, C=91" -keypass changeit
use this command
keytool -genkeypair -alias -keystore -storepass -validity 760 -keyalg RSA -keysize 2048 -dname "CN=, OU=, O=, L=Bangalore, ST=Karnataka, C=91" -keypass changeit