Play 商店 Apk ZipAlign 问题

Play store Apk ZipAlign Issue

我在 android studio

中启用了 zipAlignEnabled 标志

并且需要为将签署该应用程序并将其上传到他们的 Play 商店帐户的客户之一构建该应用程序。

签署应用程序后,上传 Play 商店时说 apk 未压缩 当我使用 CMD 签名后再次 Zip 对齐时,它会上传到 Play 商店。

签名后是否需要对齐应用

这取决于您使用的是哪种 zip 对齐工具

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.

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