为android创建密钥存储库的步骤是什么?

我需要在我的应用程序中使用谷歌地图,我不知道我错过了什么步骤。 请提供给我具体的详细步骤(我看指南没看懂)


当前回答

从命令行创建keystore文件:

Open Command line: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved // (if you want to store keystore file at C:/ open command line with RUN AS ADMINISTRATOR) C:\Windows\system32> keytool -genkey -v -keystore [your keystore file path]{C:/index.keystore} -alias [your_alias_name]{index} -keyalg RSA -keysize 2048 -validity 10000[in days] Enter > It will prompt you for password > enter password (it will be invisible) Enter keystore password: Re-enter new password: Enter > It will ask your detail. What is your first and last name? [Unknown]: {AB} // [Your Name / Name of Signer] What is the name of your organizational unit? [Unknown]: {Self} // [Your Unit Name] What is the name of your organization? [Unknown]: {Self} // [Your Organization Name] What is the name of your City or Locality? [Unknown]: {INDORE} // [Your City Name] What is the name of your State or Province? [Unknown]: {MP} //[Your State] What is the two-letter country code for this unit? [Unknown]: 91 Enter > Enter Y Is CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 correct? [no]: Y Enter > Enter password again. Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days for: CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 Enter key password for <index> (RETURN if same as keystore password): Re-enter new password:

[存储C:/index.]密钥存储库)

你的任务完成了!!

在Eclipse中导出:

导出您的android包到.apk与您创建的keystore文件

右键单击要导出的包并选择导出 选择“Export Android Application > Next” 下一个 选择Use Existing Keystore > Browse .keystore file > enter password >下一步 选择Alias > enter password >下一步 浏览APK Destination > Finish

在Android Studio中:

创建密钥存储库[.keystore/。在工作室…

点击Build (ALT+B) > Generate Signed APK… 点击Create new..(ALT+C) Browse Key store path (SHIFT+ENTER) > Select path >输入name > OK 填写关于.jks/keystore文件的详细信息 下一个 您的文件 输入工作室主密码(如果不知道可以重置)> OK 选择*目标文件夹* >生成类型 发布:用于在应用商店发布 调试:用于调试应用程序 单击Finish

完成了! !

其他回答

在Android Studio中签名应用

要在Android Studio的发布模式下签署应用,请遵循以下步骤:

1-在菜单栏上,单击“Build > Generate Signed APK”。


2-在Generate Signed APK Wizard窗口中,单击Create new创建一个新的密钥库。 如果您已经有一个密钥存储库,请转到步骤4。


3-在“New Key Store”窗口中,提供如图所示的所需信息 你的密钥应该至少有效25年,所以你可以在应用的生命周期内使用相同的密钥签署应用更新。

4—在“Generate Signed APK Wizard”窗口中,选择密钥库和私钥,并输入两者的密码。然后单击“下一步”。 5-在下一个窗口中,为签名的APK选择一个目的地,然后单击Finish。

参考

http://developer.android.com/tools/publishing/app-signing.html

首先要知道你是在调试模式还是发布模式。有两种构建模式:调试模式和发布模式。在开发和测试应用程序时使用调试模式。当你想要构建一个可以直接发布给用户或在谷歌Play等应用市场上发布的应用版本时,你可以使用发布模式。”

如果您处于调试模式,请执行以下操作… A.打开终端和类型:

keytool -exportcert -alias androiddebugkey -keystore path_to_debug_or_production_keystore -list -v

注意:对于Eclipse,调试密钥库通常位于~/.android/debug.keystore…

B.当提示输入密码时,只需输入“android”…

C.如果您处于释放模式,请按照…

http://developer.android.com/tools/publishing/app-signing.html <——这个链接几乎解释了你需要知道的一切。

基于@EliuX的回答,最新的工具与应用程序包兼容

echo y | keytool -genkey -keystore ./android.jks -dname "n=Mark Jones, ou=JavaSoft, o=Sun, c=US" -alias android -keypass android  -storepass android -keyalg RSA -keysize 2048 -validity 2000

为了你的build.gradle

    signingConfigs {
        debug {
            storeFile file('android.jks')
            keyAlias 'android'
            keyPassword 'android'
            storePassword 'android'
        }
    }

如果你不想或不能使用Android Studio,你可以使用create-android-keystore NPM工具:

$ create-android-keystore quick

这会在当前目录中生成一个新生成的密钥存储库。

更多信息:https://www.npmjs.com/package/create-android-keystore

从命令行创建keystore文件:

Open Command line: Microsoft Windows [Version 6.1.7601] Copyright (c) 2009 Microsoft Corporation. All rights reserved // (if you want to store keystore file at C:/ open command line with RUN AS ADMINISTRATOR) C:\Windows\system32> keytool -genkey -v -keystore [your keystore file path]{C:/index.keystore} -alias [your_alias_name]{index} -keyalg RSA -keysize 2048 -validity 10000[in days] Enter > It will prompt you for password > enter password (it will be invisible) Enter keystore password: Re-enter new password: Enter > It will ask your detail. What is your first and last name? [Unknown]: {AB} // [Your Name / Name of Signer] What is the name of your organizational unit? [Unknown]: {Self} // [Your Unit Name] What is the name of your organization? [Unknown]: {Self} // [Your Organization Name] What is the name of your City or Locality? [Unknown]: {INDORE} // [Your City Name] What is the name of your State or Province? [Unknown]: {MP} //[Your State] What is the two-letter country code for this unit? [Unknown]: 91 Enter > Enter Y Is CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 correct? [no]: Y Enter > Enter password again. Generating 2,048 bit RSA key pair and self-signed certificate (SHA256withRSA) with a validity of 10,000 days for: CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 Enter key password for <index> (RETURN if same as keystore password): Re-enter new password:

[存储C:/index.]密钥存储库)

你的任务完成了!!

在Eclipse中导出:

导出您的android包到.apk与您创建的keystore文件

右键单击要导出的包并选择导出 选择“Export Android Application > Next” 下一个 选择Use Existing Keystore > Browse .keystore file > enter password >下一步 选择Alias > enter password >下一步 浏览APK Destination > Finish

在Android Studio中:

创建密钥存储库[.keystore/。在工作室…

点击Build (ALT+B) > Generate Signed APK… 点击Create new..(ALT+C) Browse Key store path (SHIFT+ENTER) > Select path >输入name > OK 填写关于.jks/keystore文件的详细信息 下一个 您的文件 输入工作室主密码(如果不知道可以重置)> OK 选择*目标文件夹* >生成类型 发布:用于在应用商店发布 调试:用于调试应用程序 单击Finish

完成了! !