How to zip Align APK file in android?

2019-01-31 02:53发布

I am uploading my first APK file to google play but I am getting following error.

You uploaded an APK that is not zip aligned. You will need to run a zip align tool on your APK and upload it again.

Can any one tell me how to zip align my apk file ?

Please tell me steps for that ?

7条回答
冷血范
2楼-- · 2019-01-31 03:46

try below link or code:-

To align infile.apk and save it as outfile.apk:

zipalign [-f] [-v] <alignment> infile.apk outfile.apk

To confirm the alignment of existing.apk:

zipalign -c -v <alignment> existing.apk

The is an integer that defines the byte-alignment boundaries. This must always be 4 (which provides 32-bit alignment) or else it effectively does nothing.

Flags:

-f : overwrite existing outfile.zip
-v : verbose output
-c : confirm the alignment of the given file

http://loomsdk.com/forums/loom-with-loomscript/topics/uploading-apk-to-google-play-displays-error-not-zip-aligned

http://developer.android.com/tools/help/zipalign.html

http://www.youtube.com/watch?v=ReRCJgS-g9o

查看更多
登录 后发表回答