我正在尝试签署我的 Android 应用程序,以便可以在 Market 中发布它。当我生成密钥库时,我收到拒绝访问错误。我该如何解决?
这就是我一直在尝试做的事情:
- 右键单击 Eclipse Helios 中的项目。
- Android 工具 > 导出签名的应用程序包。
- 点击下一步。
- 我检查了“创建新密钥库”并意识到它对我没有任何帮助。它仍然要求密钥库的位置。所以我决定以艰难的方式去做。
- 关闭只读访问
C:\Program Files\Java\jdk1.6.0_25\bin
并授予该CREATOR OWNER
组对该文件夹的完全控制权。 - 在 Windows 7 64 位上打开命令行。
- 遍历到
C:\Program Files\Java\jdk1.6.0_25\bin
。 - 运行密钥工具。
- 收到拒绝访问错误。
.
C:\Program Files\Java\jdk1.6.0_25\bin>keytool -genkey -v -alias company -keyalg R
SA -keysize 2048 -validity 10000 -keystore company.keystore
Enter keystore password:
Re-enter new password:
What is your first and last name?
[Unknown]: John Smith
What is the name of your organizational unit?
[Unknown]: Android
What is the name of your organization?
[Unknown]: Company
What is the name of your City or Locality?
[Unknown]: Albany
What is the name of your State or Province?
[Unknown]: NY
What is the two-letter country code for this unit?
[Unknown]: US
Is CN=John Smith, OU=Android, O=Company, L=Albany, ST=NY, C=US correct?
[no]: yes
Generating 2,048 bit RSA key pair and self-signed certificate (SHA1withRSA) with
a validity of 10,000 days
for: CN=John Smith, OU=Android, O=Company, L=Albany, ST=NY, C=US
Enter key password for <veetle>
(RETURN if same as keystore password):
Re-enter new password:
[Storing company.keystore]
keytool error: java.io.FileNotFoundException: veetle.keystore (Access is denied)
java.io.FileNotFoundException: veetle.keystore (Access is denied)
at java.io.FileOutputStream.open(Native Method)
at java.io.FileOutputStream.<init>(FileOutputStream.java:194)
at java.io.FileOutputStream.<init>(FileOutputStream.java:84)
at sun.security.tools.KeyTool.doCommands(KeyTool.java:902)
at sun.security.tools.KeyTool.run(KeyTool.java:172)
at sun.security.tools.KeyTool.main(KeyTool.java:166)
编辑:
每次我检查文件夹权限时,我都会看到它已恢复为只读状态。每当我关闭只读时都没有错误。