Zipalign tools 을 이용해서 간단하게 zip align을 할 수 있습니다.
테마 수정을 하고 (내부 그림 파일 수정 등) 난 후 파일을 다시 넣으면 걸림감과 느려진다는(????) 느낌이 있었는데...
zip align을 하고 나니 좀 더 매그럽게 작동된다는 느낌을 받았습니다.. (플라시보 효과 일 수 도..^^;;;;)
아래는 Android Developers 에 있는 zipaligen 관련 내용입니다. 녹색으로 표시한 부분과 같이 하시면 됩니다.
http://developer.android.com/guide/publishing/app-signing.html#align
Once you have signed the .apk with your private key, run zipalign
on the file. This tool ensures that all uncompressed data starts with a particular byte alignment, relative to the start of the file. Ensuring alignment at 4-byte boundaries provides a performance optimization when installed on a device. When aligned, the Android system is able to read files with mmap()
, even if they contain binary data with alignment restrictions, rather than copying all of the data from the package. The benefit is a reduction in the amount of RAM consumed by the running application.
The zipalign
tool is provided with the Android SDK, inside the tools/
directory. To align your signed .apk, execute:
zipalign -v 4 your_project_name-unaligned.apk your_project_name.apk
The -v
flag turns on verbose output (optional). 4
is the byte-alignment (don't use anything other than 4). The first file argument is your signed .apk (the input) and the second file is the destination .apk file (the output). If you're overriding an existing .apk, add the -f
flag.
Caution: Your input .apk must be signed with your private key before you optimize the package with zipalign
. If you sign it after using zipalign
, it will undo the alignment.
zip align tool 첨부합니다~ (윈도우용 exe)
주의! 시스템 파일 복사 - 붙여넣기 과정에서 주의해 주세요! 실수 하면 벽돌 될 수 있습니다.
자료감사합니다~