why unaligned apk is needed?

后端 未结 2 1506
抹茶落季
抹茶落季 2020-11-29 17:47

Android gradle produces apk in two binaries: unaligned and aligned.

The document said...

Once you have signed the APK with your private key, r

相关标签:
2条回答
  • 2020-11-29 18:23

    It is a two step process. The unaligned apk is just an intermediate product.

    1. the unaligned apk is generated
    2. the unaligned gets aligned and produces the aligned apk
    0 讨论(0)
  • 2020-11-29 18:24

    The unaligned(signed) APK is needed because signing an aligned apk will undo the alignment.

    From the docs:

    Caution: zipalign must only be performed after the .apk file has been signed with your private key. If you perform zipalign before signing, then the signing procedure will undo the alignment.

    See this answer for more. Here is the detailed build process:

    0 讨论(0)
提交回复
热议问题