Create keystore file from 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>它会提示您输入密码>输入密码(它将不可见)
Enter keystore password:
Re-enter new password:
输入>它会询问您的详细信息 .
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
输入>输入Y.
Is CN=AB, OU=Self, O=Self, L=INDORE, ST=MP, C=91 correct?
[no]: Y
输入>再次输入密码 .
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 (RETURN if same as keystore password):
Re-enter new password:
[存储C:/index.keystore]
你完成了!
在Eclipse中导出:
使用您创建的密钥库文件将您的android包导出到.apk
右键单击要导出的包,然后选择导出
选择导出Android应用程序>下一步
下一步
选择Use Existing Keystore> Browse .keystore file> enter password> Next
选择别名>输入密码>下一步
浏览APK目的地>完成
在Android Studio中:
在工作室中创建密钥库 [.keystore/.jks] ...
单击构建(ALT B)>生成签名APK ...
点击新建..(ALT C)
浏览密钥库路径(SHIFT ENTER)>选择路径>输入名称>确定
填写 .jks/keystore 文件的详细信息
下一步
你的档案
输入Studio Master密码 (You can RESET if you don't know) >确定
选择目标文件夹>构建类型
release : for publish on app store
debug : for debugging your application
单击完成
完成!!!