Access denied when creating keystore for Android app

后端 未结 13 982
旧巷少年郎
旧巷少年郎 2020-12-24 02:19

I am trying to sign my Android app so I can release it in Market. When I generate the keystore, I get an access denied error. How do I fix this?

相关标签:
13条回答
  • 2020-12-24 02:53

    Access denied because you are not an admin.

    Simply open the cmd prompt as an administrator - that worked for me.

    0 讨论(0)
  • 2020-12-24 02:53

    The keystore that the Android SDK needs access to is not the same of the JDK. You can simply use the "create new keystore" option of the Android wizard and choose any folder you have write access to: the wizard will create there a new keystore. You don't need to use keytool form JDK.

    0 讨论(0)
  • 2020-12-24 02:54

    opening Command Prompt as a Administrator helped me.(For Windows 8.1)

    0 讨论(0)
  • 2020-12-24 02:54

    Seems that it's easier to accomplish it in command line via keytool and the latest genkeypair approach. I finished up with the following:

    keytool -genkeypair -keystore ~/.android/release.keystore -alias <my_alias> -storepass <my_cert_pass> -keyalg RSA
    

    Then I got a set of questions regarding name, organization, location and password for my alias and that was it!

    0 讨论(0)
  • 2020-12-24 02:57

    Fixing the problem on win7 (yuk) without Eclipse: i have the environment variable JAVA_HOME set to ..../JDK1.7.0_03 (android programmed from GLbasic), and i did only 2 things to fix the problem: 1) in the folder ..../Java/JDK1.7.0_03 i removed the "read-only" permission of the /bin sub-folder, which contains keytool.exe. 2) i opened the console "as administrator" (although it's the only account on my win7). then you do cd...JDK / bin, run again keytool.exe, and you get the file nickname.keystore auto-generated in JDK / bin. Once everything is done you could re-assign the "read-only" permission. Good luck!

    0 讨论(0)
  • 2020-12-24 03:02

    Below steps worked for me:

    1. Run command prompt as administrator

    2. Unchecked the read only options in C:\Program Files\Java\jdk1.6.0_25\bin This may not be required

    3. keytool -genkey -v -keystore d:\my_private_key.keystore -alias my_key_alias -keyalg RSA -keysize 2048 -validity 10000

    Tell it to create it in drive D:.

    0 讨论(0)
提交回复
热议问题