How can I create a keystore?

后端 未结 11 1097
北恋
北恋 2020-11-22 13:47

What are the steps to create a keystore for android?

I need to use google maps in my app and I don\'t know what steps I missed. Please provide me with the specific d

11条回答
  •  情歌与酒
    2020-11-22 14:19

    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.

    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 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_name is a name that you — will use later, to refer to this keystore when signing your application.

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

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

提交回复
热议问题