简体   繁体   English

Android生成签名APK

[英]Android Generate signed APK

Android Key Generator screen in Android Studio Android Studio中的Android Key Generator屏幕

When I try to generate a signed apk in Android Studio I get this screen to generate a new key. 当我尝试在Android Studio中生成已签名的apk时,我会在此屏幕上生成一个新密钥。 I have made a folder 'Android Key' and when I set path to this folder the wizard is asking for File name .jks. 我创建了一个文件夹'Android Key',当我设置这个文件夹的路径时,向导要求文件名.jks。 Where can I find .jks ? 我在哪里可以找到.jks?

Signing Your App in Android Studio 在Android Studio中签署您的应用程序

To sign your app in release mode in Android Studio, follow these steps: 要在Android Studio中以发布模式签署您的应用,请按以下步骤操作:

1.On the menu bar, click Build > Generate Signed APK. 1.在菜单栏上,单击“生成”>“生成签名的APK”。

2.On the Generate Signed APK Wizard window, click Create new to create a new keystore. 2.在Generate Signed APK Wizard窗口中,单击Create new以创建新的密钥库。 If you already have a keystore, go to step 4. 如果您已有密钥库,请转到步骤4。 在此输入图像描述

3.On the New Key Store window, provide the required information as shown in figure 1. Your key should be valid for at least 25 years, so you can sign app updates with the same key through the lifespan of your app. 3.在New Key Store窗口中,提供所需信息,如图1所示。您的密钥有效期至少为25年,因此您可以在应用程序的生命周期内使用相同的密钥签署应用程序更新。

4.On the Generate Signed APK Wizard window, select a keystore, a private key, and enter the passwords for both. 4.在Generate Signed APK Wizard窗口中,选择一个密钥库,一个私钥,然后输入两者的密码。 Then click Next. 然后单击下一步。 在此输入图像描述

5.On the next window, select a destination for the signed APK and click Finish. 5.在下一个窗口中,选择已签名APK的目标位置,然后单击“完成”。

在此输入图像描述

To generate a signed apk, you will need a keystore. 要生成签名的apk,您需要一个密钥库。 Follow this procedure to generate a keystore. 请按照此过程生成密钥库。

  1. On the menu bar, click Build > Generate Signed APK . 在菜单栏上,单击“ 生成”>“生成签名的APK”
  2. On the Generate Signed APK Wizard window, click Create new to create a new keystore. 在“ 生成签名的APK向导”窗口上,单击“ 新建”以创建新的密钥库。
  3. On the New Key Store window, provide the required information. 在“ 新建密钥库”窗口中,提供所需信息。
  4. Save fileName.jks file and keep it safe. 保存fileName.jks文件并保证其安全。

Use this keystore file for signing your file in future. 将来可以使用此密钥库文件对文件进行签名。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM