Android-运行jarSigner之后是否需要运行zipAlign? [英] Android - do I need to run zipAlign after I run jarSigner?

查看:127
本文介绍了Android-运行jarSigner之后是否需要运行zipAlign?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚成功签署了一个我要重新发布到商店的android应用.我不记得是否必须在jarSigner之后运行zipAlign吗?还是运行jarSigner后我一切都好?

I just successfully signed an android app I am trying to RE-publish to the store. I can't recall if I have to run zipAlign after jarSigner? Or after I run jarSigner I am all good?

我正在这里: http://developer.android.com/guide/publishing/publishing.html ,而在在Google Play上发布更新"部分中找不到真正的答案.

I am looking here: http://developer.android.com/guide/publishing/publishing.html and not really finding the answer to that in the "Publishing Updates on Google Play" section.

此外,当我上传新的apk时,是否必须停用旧的apk?还是只是上传旧版本?

Also, when I upload the new apk, do I have to deactivate the old one? Or just upload over the old one?

谢谢!

推荐答案

请参见此处:

警告:您必须在应用程序构建过程中的两个特定点之一上使用zipalign,具体取决于您使用的是哪种应用程序签名工具:

Caution: You must use zipalign at one of two specific points in the app-building process, depending on which app-signing tool you use:

如果您使用apksigner,则必须在对APK文件进行签名之前执行zipalign.如果您使用apksigner对APK进行签名,然后对APK进行进一步更改,则其签名无效.

If you use apksigner, zipalign must only be performed before the APK file has been signed. If you sign your APK using apksigner and make further changes to the APK, its signature is invalidated.

如果您使用jarsigner,则只有在APK文件签名后才能执行zipalign.

If you use jarsigner, zipalign must only be performed after the APK file has been signed.

这篇关于Android-运行jarSigner之后是否需要运行zipAlign?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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