将未签名的 apk 转换为已签名的 apk [英] Convert unsigned apk into signed apk

查看:40
本文介绍了将未签名的 apk 转换为已签名的 apk的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有未签名包的 android 应用程序,每当我尝试安装此 apk 时,以下错误消息都会引发 Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES].

I have an android application with un-signed package, Whenever I try to install this apk, following error message throws Failure [INSTALL_PARSE_FAILED_NO_CERTIFICATES].

现在我想用这个 apk 文件插入我的密钥库证书.有没有可能用外部命令而不是 IDE 来做到这一点?

Now I want to insert my keystore certifcate with this apk file. is there any possibilities to do this with external command rather than IDE?

推荐答案

我们可以通过JDK自带的jarsigner工具来做到这一点

We can do this via jarsigner tool comes with the JDK

步骤

在 Windows 中

In Windows

第一步:在命令行中设置路径C:\Program Files (x86)\Java\jdk1.8.0_20\bin

Step 1: set path C:\Program Files (x86)\Java\jdk1.8.0_20\bin in command line

第 2 步: jarsigner -verbose -keystore/path_to_keystore/keystoreFileName/path_to_apk_file/application_name.apk keystoreFileName_alias

-keystoreFileName_alias.您必须提供您的密钥库文件名的别名.

-keystoreFileName_alias. You have to provide your alias name of your keystore file name.

第 3 步:输入您的密钥库文件的密码

Step 3: Enter password of your keystore file

第 4 步: 已完成.它将显示警告消息,如认证有效性等.

Step 4: Completed. It will displays warning messages like certifaction validity etc..

步骤 5: 验证您的 apk 文件 jarsigner -verify/path_to_apk_file/application_name.apk

Step 5: Verify your apk file jarsigner -verify /path_to_apk_file/application_name.apk

拉链对齐:

第六步:设置路径C:\Program Files (x86)\Android\sdk\build-tools\android-4.4W在命令行中

Step 6: set path C:\Program Files (x86)\Android\sdk\build-tools\android-4.4W in command line

步骤 7: zipalign -v 4/path_to_apk_file/application_name.apk/path_to_destination_apk_locaion/zipped_application_name.apk

这篇关于将未签名的 apk 转换为已签名的 apk的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆