我正在嘗試簽署我的Android應用,以便我可以在Market中發佈它。當我生成密鑰庫時,我得到一個訪問被拒絕的錯誤。我該如何解決?爲Android應用創建密鑰存儲時拒絕訪問
這是我一直在努力做的事:在Eclipse赫利俄斯
- 右鍵單擊項目。
- Android工具>導出已簽名的應用程序包。
- 點擊下一步。
- 我檢查「創建新的密鑰庫」,並意識到它無助於我。它仍然要求密鑰庫的位置。所以我決定這麼做很難。
- 關閉
C:\Program Files\Java\jdk1.6.0_25\bin
的只讀訪問權限,並授予CREATOR OWNER
組完全控制該文件夾的權限。 - 在Windows 7 64位上打開命令行。
- 遍歷爲
C:\Program Files\Java\jdk1.6.0_25\bin
。 - 運行keytool。
- 得到拒絕訪問錯誤。
。
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)
編輯:
每次我檢查了文件夾的權限,我看到它回到只讀恢復。每當我關閉只讀時都沒有錯誤。
我有同樣的問題。嘗試以管理員身份運行cmd。 – Quethzel