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

查看:22
本文介绍了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?

谢谢!

推荐答案

参见此处:http://developer.android.com/guide/developing/tools/zipalign.html

注意:您必须在应用构建过程中的两个特定点之一使用 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天全站免登陆